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

Function RelationInvalidatesSnapshotsOnly

src/backend/utils/cache/syscache.c:1712–1730  ·  view source on GitHub ↗

* Certain relations that do not have system caches send snapshot invalidation * messages in lieu of catcache messages. This is for the benefit of * GetCatalogSnapshot(), which can then reuse its existing MVCC snapshot * for scanning one of those catalogs, rather than taking a new one, if no * invalidation has been received. * * Relations that have syscaches need not (and must not) be listed

Source from the content-addressed store, hash-verified

1710 * syscache for one of these relations, remove it from this list.
1711 */
1712bool
1713RelationInvalidatesSnapshotsOnly(Oid relid)
1714{
1715 switch (relid)
1716 {
1717 case DbRoleSettingRelationId:
1718 case DependRelationId:
1719 case SharedDependRelationId:
1720 case DescriptionRelationId:
1721 case SharedDescriptionRelationId:
1722 case SecLabelRelationId:
1723 case SharedSecLabelRelationId:
1724 return true;
1725 default:
1726 break;
1727 }
1728
1729 return false;
1730}
1731
1732/*
1733 * Test whether a relation has a system cache.

Callers 3

InitCatalogCacheFunction · 0.85
CacheInvalidateHeapTupleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected