Repair problem exposed by Jan's new parallel-regression-test scaffold:

inval.c thought it could safely use the catcache to look up the OIDs of
system relations.  Not good, considering that inval.c could be called
during catcache loading, if a shared-inval message arrives.  Rip out the
lookup logic and instead use the known OIDs from pg_class.h.
This commit is contained in:
Tom Lane
1999-11-21 01:58:22 +00:00
parent 9ba0172f41
commit 76ccf73f2b
6 changed files with 61 additions and 149 deletions

View File

@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: inval.h,v 1.13 1999/07/15 23:04:22 momjian Exp $
* $Id: inval.h,v 1.14 1999/11/21 01:58:20 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -15,32 +15,10 @@
#include "access/htup.h"
extern void InitLocalInvalidateData(void);
extern void DiscardInvalid(void);
extern void RegisterInvalid(bool send);
extern void RelationInvalidateHeapTuple(Relation relation, HeapTuple tuple);
/*
* POSTGRES local cache invalidation definitions. (originates from linval.h)
*/
typedef struct InvalidationUserData
{
struct InvalidationUserData *dataP[1]; /* VARIABLE LENGTH */
} InvalidationUserData; /* VARIABLE LENGTH STRUCTURE */
typedef struct InvalidationEntryData
{
InvalidationUserData *nextP;
InvalidationUserData userData; /* VARIABLE LENGTH ARRAY */
} InvalidationEntryData; /* VARIABLE LENGTH STRUCTURE */
typedef Pointer InvalidationEntry;
typedef InvalidationEntry LocalInvalid;
#define EmptyLocalInvalid NULL
#endif /* INVAL_H */

View File

@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: relcache.h,v 1.15 1999/10/03 23:55:38 tgl Exp $
* $Id: relcache.h,v 1.16 1999/11/21 01:58:20 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -32,8 +32,6 @@ extern void RelationRebuildRelation(Relation relation);
extern void RelationIdInvalidateRelationCacheByRelationId(Oid relationId);
extern void RelationIdInvalidateRelationCacheByAccessMethodId(Oid accessMethodId);
extern void RelationCacheInvalidate(bool onlyFlushReferenceCountZero);
extern void RelationRegisterRelation(Relation relation);