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:
parent
9ba0172f41
commit
76ccf73f2b
16
src/backend/utils/cache/catcache.c
vendored
16
src/backend/utils/cache/catcache.c
vendored
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.52 1999/11/19 18:51:48 wieck Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.53 1999/11/21 01:58:22 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -819,7 +819,7 @@ InitSysCache(char *relname,
|
|||||||
* --------------------------------
|
* --------------------------------
|
||||||
*/
|
*/
|
||||||
static HeapTuple
|
static HeapTuple
|
||||||
SearchSelfReferences(const struct catcache * cache)
|
SearchSelfReferences(struct catcache * cache)
|
||||||
{
|
{
|
||||||
HeapTuple ntp;
|
HeapTuple ntp;
|
||||||
Relation rel;
|
Relation rel;
|
||||||
@ -983,23 +983,11 @@ SearchSysCache(struct catcache * cache,
|
|||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* ----------
|
|
||||||
* It is definitely insufficient. While modifying the regression
|
|
||||||
* test to run independent tests concurrently it happened, that
|
|
||||||
* this code fails VERY often. ISTM that 'cache' points into
|
|
||||||
* shared memory, but that 'busy' means this backend is loading
|
|
||||||
* a new entry. So when another backend has set busy, this one
|
|
||||||
* think's it detected a recursion.
|
|
||||||
*
|
|
||||||
* Need's a smarter detection mechanism - Jan
|
|
||||||
*
|
|
||||||
if (cache->busy)
|
if (cache->busy)
|
||||||
{
|
{
|
||||||
elog(ERROR, "SearchSysCache: recursive use of cache %d", cache->id);
|
elog(ERROR, "SearchSysCache: recursive use of cache %d", cache->id);
|
||||||
}
|
}
|
||||||
cache->busy = true;
|
cache->busy = true;
|
||||||
* ----------
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* open the relation associated with the cache
|
* open the relation associated with the cache
|
||||||
|
132
src/backend/utils/cache/inval.c
vendored
132
src/backend/utils/cache/inval.c
vendored
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.29 1999/11/17 23:51:21 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.30 1999/11/21 01:58:22 tgl Exp $
|
||||||
*
|
*
|
||||||
* Note - this code is real crufty...
|
* Note - this code is real crufty...
|
||||||
*
|
*
|
||||||
@ -18,23 +18,36 @@
|
|||||||
#include "catalog/catalog.h"
|
#include "catalog/catalog.h"
|
||||||
#include "catalog/catname.h"
|
#include "catalog/catname.h"
|
||||||
#include "catalog/heap.h"
|
#include "catalog/heap.h"
|
||||||
|
#include "catalog/pg_class.h"
|
||||||
#include "miscadmin.h"
|
#include "miscadmin.h"
|
||||||
#include "storage/sinval.h"
|
#include "storage/sinval.h"
|
||||||
#include "utils/catcache.h"
|
#include "utils/catcache.h"
|
||||||
#include "utils/inval.h"
|
#include "utils/inval.h"
|
||||||
#include "utils/relcache.h"
|
#include "utils/relcache.h"
|
||||||
|
|
||||||
static InvalidationEntry InvalidationEntryAllocate(uint16 size);
|
|
||||||
static void LocalInvalidInvalidate(LocalInvalid invalid, void (*function) ());
|
|
||||||
static LocalInvalid LocalInvalidRegister(LocalInvalid invalid,
|
|
||||||
InvalidationEntry entry);
|
|
||||||
static void getmyrelids(void);
|
|
||||||
|
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* private invalidation structures
|
* private invalidation structures
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
typedef struct CatalogInvalidationData
|
typedef struct CatalogInvalidationData
|
||||||
{
|
{
|
||||||
Index cacheId;
|
Index cacheId;
|
||||||
@ -66,15 +79,14 @@ typedef InvalidationMessageData *InvalidationMessage;
|
|||||||
* variables and macros
|
* variables and macros
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
static LocalInvalid Invalid = EmptyLocalInvalid; /* XXX global */
|
static LocalInvalid Invalid = EmptyLocalInvalid; /* head of linked list */
|
||||||
|
|
||||||
Oid MyRelationRelationId = InvalidOid;
|
|
||||||
Oid MyAttributeRelationId = InvalidOid;
|
|
||||||
Oid MyAMRelationId = InvalidOid;
|
|
||||||
Oid MyAMOPRelationId = InvalidOid;
|
|
||||||
|
|
||||||
#define ValidateHacks() \
|
static InvalidationEntry InvalidationEntryAllocate(uint16 size);
|
||||||
if (!OidIsValid(MyRelationRelationId)) getmyrelids()
|
static void LocalInvalidInvalidate(LocalInvalid invalid, void (*function) ());
|
||||||
|
static LocalInvalid LocalInvalidRegister(LocalInvalid invalid,
|
||||||
|
InvalidationEntry entry);
|
||||||
|
|
||||||
|
|
||||||
/* ----------------------------------------------------------------
|
/* ----------------------------------------------------------------
|
||||||
* "local" invalidation support functions
|
* "local" invalidation support functions
|
||||||
@ -99,7 +111,8 @@ InvalidationEntryAllocate(uint16 size)
|
|||||||
|
|
||||||
/* --------------------------------
|
/* --------------------------------
|
||||||
* LocalInvalidRegister
|
* LocalInvalidRegister
|
||||||
* Returns a new local cache invalidation state containing a new entry.
|
* Link an invalidation entry into a chain of them. Really ugly
|
||||||
|
* coding here.
|
||||||
* --------------------------------
|
* --------------------------------
|
||||||
*/
|
*/
|
||||||
static LocalInvalid
|
static LocalInvalid
|
||||||
@ -117,7 +130,7 @@ LocalInvalidRegister(LocalInvalid invalid,
|
|||||||
/* --------------------------------
|
/* --------------------------------
|
||||||
* LocalInvalidInvalidate
|
* LocalInvalidInvalidate
|
||||||
* Processes, then frees all entries in a local cache
|
* Processes, then frees all entries in a local cache
|
||||||
* invalidation state.
|
* invalidation list.
|
||||||
* --------------------------------
|
* --------------------------------
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
@ -187,7 +200,7 @@ CacheIdRegisterLocalInvalid(Index cacheId,
|
|||||||
ItemPointerCopy(pointer, &message->any.catalog.pointerData);
|
ItemPointerCopy(pointer, &message->any.catalog.pointerData);
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* Note: Invalid is a global variable
|
* Add message to linked list of unprocessed messages.
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
Invalid = LocalInvalidRegister(Invalid, (InvalidationEntry) message);
|
Invalid = LocalInvalidRegister(Invalid, (InvalidationEntry) message);
|
||||||
@ -224,32 +237,12 @@ RelationIdRegisterLocalInvalid(Oid relationId, Oid objectId)
|
|||||||
message->any.relation.objectId = objectId;
|
message->any.relation.objectId = objectId;
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* Note: Invalid is a global variable
|
* Add message to linked list of unprocessed messages.
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
Invalid = LocalInvalidRegister(Invalid, (InvalidationEntry) message);
|
Invalid = LocalInvalidRegister(Invalid, (InvalidationEntry) message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --------------------------------
|
|
||||||
* getmyrelids
|
|
||||||
* --------------------------------
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
getmyrelids()
|
|
||||||
{
|
|
||||||
MyRelationRelationId = RelnameFindRelid(RelationRelationName);
|
|
||||||
Assert(RelationRelationName != InvalidOid);
|
|
||||||
|
|
||||||
MyAttributeRelationId = RelnameFindRelid(AttributeRelationName);
|
|
||||||
Assert(AttributeRelationName != InvalidOid);
|
|
||||||
|
|
||||||
MyAMRelationId = RelnameFindRelid(AccessMethodRelationName);
|
|
||||||
Assert(MyAMRelationId != InvalidOid);
|
|
||||||
|
|
||||||
MyAMOPRelationId = RelnameFindRelid(AccessMethodOperatorRelationName);
|
|
||||||
Assert(MyAMOPRelationId != InvalidOid);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* --------------------------------
|
/* --------------------------------
|
||||||
* CacheIdInvalidate
|
* CacheIdInvalidate
|
||||||
*
|
*
|
||||||
@ -284,38 +277,23 @@ CacheIdInvalidate(Index cacheId,
|
|||||||
|
|
||||||
CacheIdInvalidate_DEBUG1;
|
CacheIdInvalidate_DEBUG1;
|
||||||
|
|
||||||
ValidateHacks(); /* XXX */
|
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* if the cacheId is the oid of any of the tuples in the
|
* if the cacheId is the oid of any of the following system relations,
|
||||||
* following system relations, then assume we are invalidating
|
* then assume we are invalidating a relation descriptor
|
||||||
* a relation descriptor
|
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
if (cacheId == MyRelationRelationId)
|
if (cacheId == RelOid_pg_class)
|
||||||
{
|
{
|
||||||
RelationIdInvalidateRelationCacheByRelationId(hashIndex);
|
RelationIdInvalidateRelationCacheByRelationId(hashIndex);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cacheId == MyAttributeRelationId)
|
if (cacheId == RelOid_pg_attribute)
|
||||||
{
|
{
|
||||||
RelationIdInvalidateRelationCacheByRelationId(hashIndex);
|
RelationIdInvalidateRelationCacheByRelationId(hashIndex);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cacheId == MyAMRelationId)
|
|
||||||
{
|
|
||||||
RelationIdInvalidateRelationCacheByAccessMethodId(hashIndex);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cacheId == MyAMOPRelationId)
|
|
||||||
{
|
|
||||||
RelationIdInvalidateRelationCacheByAccessMethodId(InvalidOid);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* Yow! the caller asked us to invalidate something else.
|
* Yow! the caller asked us to invalidate something else.
|
||||||
* ----------------
|
* ----------------
|
||||||
@ -446,29 +424,22 @@ RelationInvalidateRelationCache(Relation relation,
|
|||||||
void (*function) ())
|
void (*function) ())
|
||||||
{
|
{
|
||||||
Oid relationId;
|
Oid relationId;
|
||||||
Oid objectId = (Oid) 0;
|
Oid objectId;
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* get the relation object id
|
* get the relation object id
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
ValidateHacks(); /* XXX */
|
|
||||||
relationId = RelationGetRelid(relation);
|
relationId = RelationGetRelid(relation);
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
*
|
* is it one of the ones we need to send an SI message for?
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
if (relationId == MyRelationRelationId)
|
if (relationId == RelOid_pg_class)
|
||||||
objectId = tuple->t_data->t_oid;
|
objectId = tuple->t_data->t_oid;
|
||||||
else if (relationId == MyAttributeRelationId)
|
else if (relationId == RelOid_pg_attribute)
|
||||||
objectId = ((Form_pg_attribute) GETSTRUCT(tuple))->attrelid;
|
objectId = ((Form_pg_attribute) GETSTRUCT(tuple))->attrelid;
|
||||||
else if (relationId == MyAMRelationId)
|
|
||||||
objectId = tuple->t_data->t_oid;
|
|
||||||
else if (relationId == MyAMOPRelationId)
|
|
||||||
{
|
|
||||||
; /* objectId is unused */
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -482,19 +453,6 @@ RelationInvalidateRelationCache(Relation relation,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* InitLocalInvalidateData
|
|
||||||
*
|
|
||||||
* Setup this before anything could ever get invalid!
|
|
||||||
* Called by InitPostgres();
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
InitLocalInvalidateData()
|
|
||||||
{
|
|
||||||
ValidateHacks();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DiscardInvalid
|
* DiscardInvalid
|
||||||
* Causes the invalidated cache state to be discarded.
|
* Causes the invalidated cache state to be discarded.
|
||||||
@ -528,6 +486,8 @@ DiscardInvalid()
|
|||||||
void
|
void
|
||||||
RegisterInvalid(bool send)
|
RegisterInvalid(bool send)
|
||||||
{
|
{
|
||||||
|
LocalInvalid invalid;
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* debugging stuff
|
* debugging stuff
|
||||||
* ----------------
|
* ----------------
|
||||||
@ -537,17 +497,19 @@ RegisterInvalid(bool send)
|
|||||||
#endif /* defined(INVALIDDEBUG) */
|
#endif /* defined(INVALIDDEBUG) */
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* Note: Invalid is a global variable
|
* Process and free the current list of inval messages.
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
|
invalid = Invalid;
|
||||||
|
Invalid = EmptyLocalInvalid; /* anything added now is part of a new list */
|
||||||
|
|
||||||
if (send)
|
if (send)
|
||||||
LocalInvalidInvalidate(Invalid,
|
LocalInvalidInvalidate(invalid,
|
||||||
InvalidationMessageRegisterSharedInvalid);
|
InvalidationMessageRegisterSharedInvalid);
|
||||||
else
|
else
|
||||||
LocalInvalidInvalidate(Invalid,
|
LocalInvalidInvalidate(invalid,
|
||||||
InvalidationMessageCacheInvalidate);
|
InvalidationMessageCacheInvalidate);
|
||||||
|
|
||||||
Invalid = EmptyLocalInvalid;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
26
src/backend/utils/cache/relcache.c
vendored
26
src/backend/utils/cache/relcache.c
vendored
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.79 1999/11/18 13:56:28 wieck Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.80 1999/11/21 01:58:22 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -209,11 +209,6 @@ do { \
|
|||||||
static void formrdesc(char *relationName, u_int natts,
|
static void formrdesc(char *relationName, u_int natts,
|
||||||
FormData_pg_attribute *att);
|
FormData_pg_attribute *att);
|
||||||
|
|
||||||
#ifdef NOT_USED /* See comments at line 1304 */
|
|
||||||
static void RelationFlushIndexes(Relation *r, Oid accessMethodId);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static HeapTuple ScanPgRelation(RelationBuildDescInfo buildinfo);
|
static HeapTuple ScanPgRelation(RelationBuildDescInfo buildinfo);
|
||||||
static HeapTuple scan_pg_rel_seq(RelationBuildDescInfo buildinfo);
|
static HeapTuple scan_pg_rel_seq(RelationBuildDescInfo buildinfo);
|
||||||
static HeapTuple scan_pg_rel_ind(RelationBuildDescInfo buildinfo);
|
static HeapTuple scan_pg_rel_ind(RelationBuildDescInfo buildinfo);
|
||||||
@ -1431,12 +1426,9 @@ RelationIdInvalidateRelationCacheByRelationId(Oid relationId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if NOT_USED /* See comments at line 1304 */
|
#if NOT_USED
|
||||||
/* --------------------------------
|
/* only used by RelationIdInvalidateRelationCacheByAccessMethodId,
|
||||||
* RelationIdInvalidateRelationCacheByAccessMethodId
|
* which is dead code.
|
||||||
*
|
|
||||||
* RelationFlushIndexes is needed for use with HashTableWalk..
|
|
||||||
* --------------------------------
|
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
RelationFlushIndexes(Relation *r,
|
RelationFlushIndexes(Relation *r,
|
||||||
@ -1459,11 +1451,10 @@ RelationFlushIndexes(Relation *r,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if NOT_USED
|
||||||
void
|
void
|
||||||
RelationIdInvalidateRelationCacheByAccessMethodId(Oid accessMethodId)
|
RelationIdInvalidateRelationCacheByAccessMethodId(Oid accessMethodId)
|
||||||
{
|
{
|
||||||
#ifdef NOT_USED
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 25 aug 1992: mao commented out the ht walk below. it should be
|
* 25 aug 1992: mao commented out the ht walk below. it should be
|
||||||
* doing the right thing, in theory, but flushing reldescs for index
|
* doing the right thing, in theory, but flushing reldescs for index
|
||||||
@ -1471,14 +1462,15 @@ RelationIdInvalidateRelationCacheByAccessMethodId(Oid accessMethodId)
|
|||||||
* don't want to introduce new bugs. this code never executed before,
|
* don't want to introduce new bugs. this code never executed before,
|
||||||
* so i'm turning it off for now. after the release is cut, i'll fix
|
* so i'm turning it off for now. after the release is cut, i'll fix
|
||||||
* this up.
|
* this up.
|
||||||
|
*
|
||||||
|
* 20 nov 1999: this code has still never done anything, so I'm
|
||||||
|
* cutting the routine out of the system entirely. tgl
|
||||||
*/
|
*/
|
||||||
|
|
||||||
HashTableWalk(RelationNameCache, (HashtFunc) RelationFlushIndexes,
|
HashTableWalk(RelationNameCache, (HashtFunc) RelationFlushIndexes,
|
||||||
accessMethodId);
|
accessMethodId);
|
||||||
#else
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* RelationCacheInvalidate
|
* RelationCacheInvalidate
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.52 1999/10/25 03:07:51 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.53 1999/11/21 01:58:21 tgl Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* InitPostgres() is the function called from PostgresMain
|
* InitPostgres() is the function called from PostgresMain
|
||||||
@ -553,12 +553,6 @@ InitPostgres(char *name) /* database name */
|
|||||||
*/
|
*/
|
||||||
InitUserid();
|
InitUserid();
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize local data in cache invalidation stuff
|
|
||||||
*/
|
|
||||||
if (!bootstrap)
|
|
||||||
InitLocalInvalidateData();
|
|
||||||
|
|
||||||
if (lockingOff)
|
if (lockingOff)
|
||||||
LockDisable(true);
|
LockDisable(true);
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* 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"
|
#include "access/htup.h"
|
||||||
|
|
||||||
extern void InitLocalInvalidateData(void);
|
|
||||||
|
|
||||||
extern void DiscardInvalid(void);
|
extern void DiscardInvalid(void);
|
||||||
|
|
||||||
extern void RegisterInvalid(bool send);
|
extern void RegisterInvalid(bool send);
|
||||||
|
|
||||||
extern void RelationInvalidateHeapTuple(Relation relation, HeapTuple tuple);
|
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 */
|
#endif /* INVAL_H */
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* 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 RelationIdInvalidateRelationCacheByRelationId(Oid relationId);
|
||||||
|
|
||||||
extern void RelationIdInvalidateRelationCacheByAccessMethodId(Oid accessMethodId);
|
|
||||||
|
|
||||||
extern void RelationCacheInvalidate(bool onlyFlushReferenceCountZero);
|
extern void RelationCacheInvalidate(bool onlyFlushReferenceCountZero);
|
||||||
|
|
||||||
extern void RelationRegisterRelation(Relation relation);
|
extern void RelationRegisterRelation(Relation relation);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user