Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
beac8c1c
Commit
beac8c1c
authored
Oct 12, 1998
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for vacuum and cache use. Fix for BSDI 4.0.
parent
5a61590e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
20 additions
and
55 deletions
+20
-55
src/backend/access/heap/heapam.c
src/backend/access/heap/heapam.c
+1
-25
src/backend/commands/vacuum.c
src/backend/commands/vacuum.c
+4
-7
src/backend/utils/cache/catcache.c
src/backend/utils/cache/catcache.c
+4
-1
src/backend/utils/cache/inval.c
src/backend/utils/cache/inval.c
+3
-16
src/include/utils/inval.h
src/include/utils/inval.h
+1
-3
src/makefiles/Makefile.bsdi
src/makefiles/Makefile.bsdi
+5
-0
src/makefiles/Makefile.linux
src/makefiles/Makefile.linux
+1
-1
src/makefiles/Makefile.sco
src/makefiles/Makefile.sco
+1
-2
No files found.
src/backend/access/heap/heapam.c
View file @
beac8c1c
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.3
6 1998/10/08 18:29:12
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.3
7 1998/10/12 00:53:30
momjian Exp $
*
*
* INTERFACE ROUTINES
...
...
@@ -98,8 +98,6 @@
static
void
doinsert
(
Relation
relation
,
HeapTuple
tup
);
static
bool
ImmediateInvalidation
;
/* ----------------------------------------------------------------
* heap support routines
* ----------------------------------------------------------------
...
...
@@ -484,22 +482,6 @@ doinsert(Relation relation, HeapTuple tup)
return
;
}
/*
* HeapScanIsValid is now a macro in relscan.h -cim 4/27/91
*/
#ifdef NOT_USED
/* ----------------
* SetHeapAccessMethodImmediateInvalidation
* ----------------
*/
void
SetHeapAccessMethodImmediateInvalidation
(
bool
on
)
{
ImmediateInvalidation
=
on
;
}
#endif
/* ----------------------------------------------------------------
* heap access method interface
...
...
@@ -1149,9 +1131,7 @@ heap_insert(Relation relation, HeapTuple tup)
* invalidate caches (only works for system relations)
* ----------------
*/
SetRefreshWhenInvalidate
(
ImmediateInvalidation
);
RelationInvalidateHeapTuple
(
relation
,
tup
);
SetRefreshWhenInvalidate
((
bool
)
!
ImmediateInvalidation
);
}
return
tup
->
t_oid
;
...
...
@@ -1253,9 +1233,7 @@ heap_delete(Relation relation, ItemPointer tid)
* invalidate caches
* ----------------
*/
SetRefreshWhenInvalidate
(
ImmediateInvalidation
);
RelationInvalidateHeapTuple
(
relation
,
tp
);
SetRefreshWhenInvalidate
((
bool
)
!
ImmediateInvalidation
);
WriteBuffer
(
buf
);
if
(
IsSystemRelationName
(
RelationGetRelationName
(
relation
)
->
data
))
...
...
@@ -1407,9 +1385,7 @@ heap_replace(Relation relation, ItemPointer otid, HeapTuple replace_tuple)
* invalidate caches
* ----------------
*/
SetRefreshWhenInvalidate
(
ImmediateInvalidation
);
RelationInvalidateHeapTuple
(
relation
,
old_tuple
);
SetRefreshWhenInvalidate
((
bool
)
!
ImmediateInvalidation
);
WriteBuffer
(
buffer
);
...
...
src/backend/commands/vacuum.c
View file @
beac8c1c
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.8
7 1998/10/09 21:31:34
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.8
8 1998/10/12 00:53:31
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1084,6 +1084,8 @@ vc_rpfheap(VRelStats *vacrelstats, Relation onerel,
newtup
=
(
HeapTuple
)
palloc
(
tuple_len
);
memmove
((
char
*
)
newtup
,
(
char
*
)
tuple
,
tuple_len
);
RelationInvalidateHeapTuple
(
onerel
,
tuple
);
/* store transaction information */
TransactionIdStore
(
myXID
,
&
(
newtup
->
t_xmin
));
newtup
->
t_cmin
=
myCID
;
...
...
@@ -1876,12 +1878,7 @@ vc_updstats(Oid relid, int num_pages, int num_tuples, bool hasindex, VRelStats *
/* XXX -- after write, should invalidate relcache in other backends */
WriteNoReleaseBuffer
(
ItemPointerGetBlockNumber
(
&
rtup
->
t_ctid
));
/*
* invalidating system relations confuses the function cache of
* pg_operator and pg_opclass, bjm
*/
if
(
!
IsSystemRelationName
(
pgcform
->
relname
.
data
))
RelationInvalidateHeapTuple
(
rd
,
rtup
);
RelationInvalidateHeapTuple
(
rd
,
rtup
);
ReleaseBuffer
(
buffer
);
heap_close
(
rd
);
...
...
src/backend/utils/cache/catcache.c
View file @
beac8c1c
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.3
4 1998/09/01 04:32:57
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.3
5 1998/10/12 00:53:33
momjian Exp $
*
* Notes:
* XXX This needs to use exception.h to handle recovery when
...
...
@@ -1108,6 +1108,7 @@ RelationInvalidateCatalogCacheTuple(Relation relation,
*/
Assert
(
RelationIsValid
(
relation
));
Assert
(
HeapTupleIsValid
(
tuple
));
Assert
(
PointerIsValid
(
function
));
CACHE1_elog
(
DEBUG
,
"RelationInvalidateCatalogCacheTuple: called"
);
/* ----------------
...
...
@@ -1132,9 +1133,11 @@ RelationInvalidateCatalogCacheTuple(Relation relation,
if
(
relationId
!=
ccp
->
relationId
)
continue
;
#ifdef NOT_USED
/* OPT inline simplification of CatalogCacheIdInvalidate */
if
(
!
PointerIsValid
(
function
))
function
=
CatalogCacheIdInvalidate
;
#endif
(
*
function
)
(
ccp
->
id
,
CatalogCacheComputeTupleHashIndex
(
ccp
,
relation
,
tuple
),
...
...
src/backend/utils/cache/inval.c
View file @
beac8c1c
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.1
6 1998/09/01 04:33:00
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.1
7 1998/10/12 00:53:34
momjian Exp $
*
* Note - this code is real crufty...
*
...
...
@@ -74,7 +74,6 @@ typedef InvalidationMessageData *InvalidationMessage;
* ----------------
*/
static
LocalInvalid
Invalid
=
EmptyLocalInvalid
;
/* XXX global */
static
bool
RefreshWhenInvalidate
=
false
;
Oid
MyRelationRelationId
=
InvalidOid
;
Oid
MyAttributeRelationId
=
InvalidOid
;
...
...
@@ -572,20 +571,6 @@ RegisterInvalid(bool send)
Invalid
=
EmptyLocalInvalid
;
}
/*
* SetRefreshWhenInvalidate --
* Causes the local caches to be immediately refreshed iff true.
*/
void
SetRefreshWhenInvalidate
(
bool
on
)
{
#ifdef INVALIDDEBUG
elog
(
DEBUG
,
"RefreshWhenInvalidate(%d) called"
,
on
);
#endif
/* defined(INVALIDDEBUG) */
RefreshWhenInvalidate
=
on
;
}
/*
* RelationIdInvalidateHeapTuple --
* Causes the given tuple in a relation to be invalidated.
...
...
@@ -641,9 +626,11 @@ RelationInvalidateHeapTuple(Relation relation, HeapTuple tuple)
tuple
,
RelationIdRegisterLocalInvalid
);
#ifdef NOT_USED
if
(
RefreshWhenInvalidate
)
/* what does this do? bjm 1998/08/20 */
RelationInvalidateCatalogCacheTuple
(
relation
,
tuple
,
(
void
(
*
)
())
NULL
);
#endif
}
src/include/utils/inval.h
View file @
beac8c1c
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: inval.h,v 1.
9 1998/09/01 04:39:15
momjian Exp $
* $Id: inval.h,v 1.
10 1998/10/12 00:53:36
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -22,8 +22,6 @@ extern void DiscardInvalid(void);
extern
void
RegisterInvalid
(
bool
send
);
extern
void
SetRefreshWhenInvalidate
(
bool
on
);
extern
void
RelationInvalidateHeapTuple
(
Relation
relation
,
HeapTuple
tuple
);
/*
...
...
src/makefiles/Makefile.bsdi
View file @
beac8c1c
# for bsdi 4.0 ELF
# if we defined .so in template/bsdi_4.0
ifeq
($(DLSUFFIX), .so)
LDFLAGS
+=
-export-dynamic
endif
%.so
:
%.o
$(LD)
-shared
-o
$@
$<
src/makefiles/Makefile.linux
View file @
beac8c1c
LDFLAGS
+=
-export-dynamic
#-Wl,-rpath -Wl,
$(LIBDIR)
LDFLAGS
+=
-export-dynamic
MK_NO_LORDER
=
true
%.so
:
%.o
...
...
src/makefiles/Makefile.sco
View file @
beac8c1c
CFLAGS
+=
-dy
LDFLAGS
+=
-W
l,-Bexport
%.so
:
%.o
$(LD)
-G
-Bdynamic
-o
$@
$<
%.so
:
%.o
$(LD)
-G
-Bdynamic
-o
$@
$<
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment