Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbeac8c1

Browse files
committed
Fix for vacuum and cache use. Fix for BSDI 4.0.
1 parent5a61590 commitbeac8c1

File tree

8 files changed

+20
-55
lines changed

8 files changed

+20
-55
lines changed

‎src/backend/access/heap/heapam.c

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.36 1998/10/08 18:29:12 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.37 1998/10/12 00:53:30 momjian Exp $
1111
*
1212
*
1313
* INTERFACE ROUTINES
@@ -98,8 +98,6 @@
9898

9999
staticvoiddoinsert(Relationrelation,HeapTupletup);
100100

101-
staticboolImmediateInvalidation;
102-
103101
/* ----------------------------------------------------------------
104102
* heap support routines
105103
* ----------------------------------------------------------------
@@ -484,22 +482,6 @@ doinsert(Relation relation, HeapTuple tup)
484482
return;
485483
}
486484

487-
/*
488-
*HeapScanIsValid is now a macro in relscan.h -cim 4/27/91
489-
*/
490-
491-
#ifdefNOT_USED
492-
/* ----------------
493-
*SetHeapAccessMethodImmediateInvalidation
494-
* ----------------
495-
*/
496-
void
497-
SetHeapAccessMethodImmediateInvalidation(boolon)
498-
{
499-
ImmediateInvalidation=on;
500-
}
501-
502-
#endif
503485

504486
/* ----------------------------------------------------------------
505487
* heap access method interface
@@ -1149,9 +1131,7 @@ heap_insert(Relation relation, HeapTuple tup)
11491131
*invalidate caches (only works for system relations)
11501132
* ----------------
11511133
*/
1152-
SetRefreshWhenInvalidate(ImmediateInvalidation);
11531134
RelationInvalidateHeapTuple(relation,tup);
1154-
SetRefreshWhenInvalidate((bool) !ImmediateInvalidation);
11551135
}
11561136

11571137
returntup->t_oid;
@@ -1253,9 +1233,7 @@ heap_delete(Relation relation, ItemPointer tid)
12531233
*invalidate caches
12541234
* ----------------
12551235
*/
1256-
SetRefreshWhenInvalidate(ImmediateInvalidation);
12571236
RelationInvalidateHeapTuple(relation,tp);
1258-
SetRefreshWhenInvalidate((bool) !ImmediateInvalidation);
12591237

12601238
WriteBuffer(buf);
12611239
if (IsSystemRelationName(RelationGetRelationName(relation)->data))
@@ -1407,9 +1385,7 @@ heap_replace(Relation relation, ItemPointer otid, HeapTuple replace_tuple)
14071385
*invalidate caches
14081386
* ----------------
14091387
*/
1410-
SetRefreshWhenInvalidate(ImmediateInvalidation);
14111388
RelationInvalidateHeapTuple(relation,old_tuple);
1412-
SetRefreshWhenInvalidate((bool) !ImmediateInvalidation);
14131389

14141390
WriteBuffer(buffer);
14151391

‎src/backend/commands/vacuum.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.87 1998/10/09 21:31:34 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.88 1998/10/12 00:53:31 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1084,6 +1084,8 @@ vc_rpfheap(VRelStats *vacrelstats, Relation onerel,
10841084
newtup= (HeapTuple)palloc(tuple_len);
10851085
memmove((char*)newtup, (char*)tuple,tuple_len);
10861086

1087+
RelationInvalidateHeapTuple(onerel,tuple);
1088+
10871089
/* store transaction information */
10881090
TransactionIdStore(myXID,&(newtup->t_xmin));
10891091
newtup->t_cmin=myCID;
@@ -1876,12 +1878,7 @@ vc_updstats(Oid relid, int num_pages, int num_tuples, bool hasindex, VRelStats *
18761878
/* XXX -- after write, should invalidate relcache in other backends */
18771879
WriteNoReleaseBuffer(ItemPointerGetBlockNumber(&rtup->t_ctid));
18781880

1879-
/*
1880-
* invalidating system relations confuses the function cache of
1881-
* pg_operator and pg_opclass, bjm
1882-
*/
1883-
if (!IsSystemRelationName(pgcform->relname.data))
1884-
RelationInvalidateHeapTuple(rd,rtup);
1881+
RelationInvalidateHeapTuple(rd,rtup);
18851882

18861883
ReleaseBuffer(buffer);
18871884
heap_close(rd);

‎src/backend/utils/cache/catcache.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.34 1998/09/01 04:32:57 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.35 1998/10/12 00:53:33 momjian Exp $
1111
*
1212
* Notes:
1313
*XXX This needs to use exception.h to handle recovery when
@@ -1108,6 +1108,7 @@ RelationInvalidateCatalogCacheTuple(Relation relation,
11081108
*/
11091109
Assert(RelationIsValid(relation));
11101110
Assert(HeapTupleIsValid(tuple));
1111+
Assert(PointerIsValid(function));
11111112
CACHE1_elog(DEBUG,"RelationInvalidateCatalogCacheTuple: called");
11121113

11131114
/* ----------------
@@ -1132,9 +1133,11 @@ RelationInvalidateCatalogCacheTuple(Relation relation,
11321133
if (relationId!=ccp->relationId)
11331134
continue;
11341135

1136+
#ifdefNOT_USED
11351137
/* OPT inline simplification of CatalogCacheIdInvalidate */
11361138
if (!PointerIsValid(function))
11371139
function=CatalogCacheIdInvalidate;
1140+
#endif
11381141

11391142
(*function) (ccp->id,
11401143
CatalogCacheComputeTupleHashIndex(ccp,relation,tuple),

‎src/backend/utils/cache/inval.c

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.16 1998/09/01 04:33:00 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.17 1998/10/12 00:53:34 momjian Exp $
1111
*
1212
* Note - this code is real crufty...
1313
*
@@ -74,7 +74,6 @@ typedef InvalidationMessageData *InvalidationMessage;
7474
* ----------------
7575
*/
7676
staticLocalInvalidInvalid=EmptyLocalInvalid;/* XXX global */
77-
staticboolRefreshWhenInvalidate= false;
7877

7978
OidMyRelationRelationId=InvalidOid;
8079
OidMyAttributeRelationId=InvalidOid;
@@ -572,20 +571,6 @@ RegisterInvalid(bool send)
572571
Invalid=EmptyLocalInvalid;
573572
}
574573

575-
/*
576-
* SetRefreshWhenInvalidate --
577-
*Causes the local caches to be immediately refreshed iff true.
578-
*/
579-
void
580-
SetRefreshWhenInvalidate(boolon)
581-
{
582-
#ifdefINVALIDDEBUG
583-
elog(DEBUG,"RefreshWhenInvalidate(%d) called",on);
584-
#endif/* defined(INVALIDDEBUG) */
585-
586-
RefreshWhenInvalidate=on;
587-
}
588-
589574
/*
590575
* RelationIdInvalidateHeapTuple --
591576
*Causes the given tuple in a relation to be invalidated.
@@ -641,9 +626,11 @@ RelationInvalidateHeapTuple(Relation relation, HeapTuple tuple)
641626
tuple,
642627
RelationIdRegisterLocalInvalid);
643628

629+
#ifdefNOT_USED
644630
if (RefreshWhenInvalidate)
645631
/* what does this do? bjm 1998/08/20 */
646632
RelationInvalidateCatalogCacheTuple(relation,
647633
tuple,
648634
(void (*) ())NULL);
635+
#endif
649636
}

‎src/include/utils/inval.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: inval.h,v 1.9 1998/09/01 04:39:15 momjian Exp $
9+
* $Id: inval.h,v 1.10 1998/10/12 00:53:36 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -22,8 +22,6 @@ extern void DiscardInvalid(void);
2222

2323
externvoidRegisterInvalid(boolsend);
2424

25-
externvoidSetRefreshWhenInvalidate(boolon);
26-
2725
externvoidRelationInvalidateHeapTuple(Relationrelation,HeapTupletuple);
2826

2927
/*

‎src/makefiles/Makefile.bsdi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# for bsdi 4.0 ELF
22
# if we defined .so in template/bsdi_4.0
3+
4+
ifeq ($(DLSUFFIX), .so)
5+
LDFLAGS+= -export-dynamic
6+
endif
7+
38
%.so: %.o
49
$(LD) -shared -o $@ $<

‎src/makefiles/Makefile.linux

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
LDFLAGS+= -export-dynamic #-Wl,-rpath -Wl,$(LIBDIR)
1+
LDFLAGS+= -export-dynamic
22
MK_NO_LORDER= true
33

44
%.so: %.o

‎src/makefiles/Makefile.sco

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
CFLAGS+=-dy
22
LDFLAGS+=-W l,-Bexport
3-
%.so:%.o
4-
$(LD)-G-Bdynamic -o $@ $<
3+
54
%.so:%.o
65
$(LD)-G-Bdynamic -o $@ $<

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp