24 #include "utils/fmgroids.h" 60 Assert(RelfilenodeMapHash != NULL);
72 entry->
relid == relid)
98 MemSet(&relfilenode_skey, 0,
sizeof(relfilenode_skey));
100 for (i = 0; i < 2; i++)
103 &relfilenode_skey[i].sk_func,
110 relfilenode_skey[0].
sk_attno = Anum_pg_class_reltablespace;
111 relfilenode_skey[1].
sk_attno = Anum_pg_class_relfilenode;
149 if (RelfilenodeMapHash == NULL)
156 MemSet(&key, 0,
sizeof(key));
177 if (reltablespace == GLOBALTABLESPACE_OID)
195 memcpy(skey, relfilenode_skey,
sizeof(skey));
216 "unexpected duplicate for tablespace %u, relfilenode %u",
217 reltablespace, relfilenode);
220 Assert(classform->reltablespace == reltablespace);
221 Assert(classform->relfilenode == relfilenode);
222 relid = classform->oid;
241 entry->
relid = relid;
void table_close(Relation relation, LOCKMODE lockmode)
void systable_endscan(SysScanDesc sysscan)
Oid RelidByRelfilenode(Oid reltablespace, Oid relfilenode)
#define MemSet(start, val, len)
void * hash_search(HTAB *hashp, const void *keyPtr, HASHACTION action, bool *foundPtr)
SysScanDesc systable_beginscan(Relation heapRelation, Oid indexId, bool indexOK, Snapshot snapshot, int nkeys, ScanKey key)
void CacheRegisterRelcacheCallback(RelcacheCallbackFunction func, Datum arg)
HeapTuple systable_getnext(SysScanDesc sysscan)
static HTAB * RelfilenodeMapHash
#define ObjectIdGetDatum(X)
StrategyNumber sk_strategy
HTAB * hash_create(const char *tabname, long nelem, const HASHCTL *info, int flags)
void fmgr_info_cxt(Oid functionId, FmgrInfo *finfo, MemoryContext mcxt)
static void RelfilenodeMapInvalidateCallback(Datum arg, Oid relid)
static ScanKeyData relfilenode_skey[2]
#define ClassTblspcRelfilenodeIndexId
Oid RelationMapFilenodeToOid(Oid filenode, bool shared)
#define HeapTupleIsValid(tuple)
#define Assert(condition)
void CreateCacheMemoryContext(void)
static void InitializeRelfilenodeMap(void)
void * hash_seq_search(HASH_SEQ_STATUS *status)
void hash_seq_init(HASH_SEQ_STATUS *status, HTAB *hashp)
FormData_pg_class * Form_pg_class
static void static void status(const char *fmt,...) pg_attribute_printf(1
Relation table_open(Oid relationId, LOCKMODE lockmode)
#define BTEqualStrategyNumber
MemoryContext CacheMemoryContext