1/*-------------------------------------------------------------------------
4 * Relation descriptor cache definitions.
7 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/utils/relcache.h
12 *-------------------------------------------------------------------------
23 * Name of relcache init file(s), used to speed up backend startup
25 #define RELCACHE_INIT_FILENAME "pg_internal.init"
30 * RelationPtr is used in the executor to support index scans
31 * where we have to keep track of several index relations in an
38 * Routines to open (lookup) and close a relcache entry
40#ifdef USE_ASSERT_CHECKING
52 * Routines to compute/retrieve additional cached information
65 * Which set of columns to return by RelationGetIndexAttrBitmap.
88/* caller must include pg_publication.h */
96 * Routines to support ereport() reports of relation-related errors
104 * Routines for backend startup
111 * Routine to create a relcache entry for an about-to-be-created relation
120 bool shared_relation,
121 bool mapped_relation,
126 * Routines to manage assignment of new relfilenumber to a relation
132 * Routines for flushing/rebuilding relcache entries in various scenarios
140#ifdef USE_ASSERT_CHECKING
143 #define AssertPendingSyncs_RelationCache() do {} while (0)
150 * Routines to help manage rebuilding of relcache init files
157/* should be used only by relcache.c and catcache.c */
160/* should be used only by relcache.c and postinit.c */
163#endif /* RELCACHE_H */
List * RelationGetIndexList(Relation relation)
void RelationCacheInvalidate(bool debug_discard)
struct RelationData * Relation
PGDLLIMPORT bool criticalRelcachesBuilt
Oid RelationGetPrimaryKeyIndex(Relation relation, bool deferrable_ok)
List * RelationGetDummyIndexExpressions(Relation relation)
int errtableconstraint(Relation rel, const char *conname)
int errtablecol(Relation rel, int attnum)
@ INDEX_ATTR_BITMAP_HOT_BLOCKING
@ INDEX_ATTR_BITMAP_PRIMARY_KEY
@ INDEX_ATTR_BITMAP_SUMMARIZED
@ INDEX_ATTR_BITMAP_IDENTITY_KEY
PGDLLIMPORT bool criticalSharedRelcachesBuilt
void RelationInitIndexAccessInfo(Relation relation)
List * RelationGetIndexPredicate(Relation relation)
Bitmapset * RelationGetIndexAttrBitmap(Relation relation, IndexAttrBitmapKind attrKind)
void AtEOSubXact_RelationCache(bool isCommit, SubTransactionId mySubid, SubTransactionId parentSubid)
List * RelationGetStatExtList(Relation relation)
void RelationCacheInitFilePostInvalidate(void)
void RelationCacheInitializePhase3(void)
void RelationInitTableAccessMethod(Relation relation)
void RelationBuildPublicationDesc(Relation relation, struct PublicationDesc *pubdesc)
void RelationSetNewRelfilenumber(Relation relation, char persistence)
#define AssertPendingSyncs_RelationCache()
List * RelationGetFKeyList(Relation relation)
Oid RelationGetReplicaIndex(Relation relation)
Relation RelationIdGetRelation(Oid relationId)
void AtEOXact_RelationCache(bool isCommit)
void RelationForgetRelation(Oid rid)
void RelationCacheInitialize(void)
void RelationCacheInitFilePreInvalidate(void)
List * RelationGetIndexExpressions(Relation relation)
Relation RelationBuildLocalRelation(const char *relname, Oid relnamespace, TupleDesc tupDesc, Oid relid, Oid accessmtd, RelFileNumber relfilenumber, Oid reltablespace, bool shared_relation, bool mapped_relation, char relpersistence, char relkind)
void RelationAssumeNewRelfilelocator(Relation relation)
void RelationCacheInitFileRemove(void)
int errtablecolname(Relation rel, const char *colname)
void RelationCacheInitializePhase2(void)
bool RelationIdIsInInitFile(Oid relationId)
int errtable(Relation rel)
void RelationCacheInvalidateEntry(Oid relationId)
bytea ** RelationGetIndexAttOptions(Relation relation, bool copy)
Bitmapset * RelationGetIdentityKeyBitmap(Relation relation)
static void AssertCouldGetRelation(void)
void RelationGetExclusionInfo(Relation indexRelation, Oid **operators, Oid **procs, uint16 **strategies)
void RelationClose(Relation relation)