MCPcopy Create free account
hub / github.com/apache/cloudberry / RelationIdIsInInitFile

Function RelationIdIsInInitFile

src/backend/utils/cache/relcache.c:6776–6792  ·  view source on GitHub ↗

* Determine whether a given relation (identified by OID) is one of the ones * we should store in a relcache init file. * * We must cache all nailed rels, and for efficiency we should cache every rel * that supports a syscache. The former set is almost but not quite a subset * of the latter. The special cases are relations where * RelationCacheInitializePhase2/3 chooses to nail for efficienc

Source from the content-addressed store, hash-verified

6774 * which do not support any syscache.
6775 */
6776bool
6777RelationIdIsInInitFile(Oid relationId)
6778{
6779 if (relationId == SharedSecLabelRelationId ||
6780 relationId == TriggerRelidNameIndexId ||
6781 relationId == DatabaseNameIndexId ||
6782 relationId == SharedSecLabelObjectIndexId)
6783 {
6784 /*
6785 * If this Assert fails, we don't need the applicable special case
6786 * anymore.
6787 */
6788 Assert(!RelationSupportsSysCache(relationId));
6789 return true;
6790 }
6791 return RelationSupportsSysCache(relationId);
6792}
6793
6794/*
6795 * Invalidate (remove) the init file during commit of a transaction that

Callers 2

write_relcache_init_fileFunction · 0.85

Calls 1

RelationSupportsSysCacheFunction · 0.85

Tested by

no test coverage detected