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

Function PrepareInvalidationState

src/backend/utils/cache/inval.c:817–840  ·  view source on GitHub ↗

* PrepareInvalidationState * Initialize inval lists for the current (sub)transaction. */

Source from the content-addressed store, hash-verified

815 * Initialize inval lists for the current (sub)transaction.
816 */
817static void
818PrepareInvalidationState(void)
819{
820 TransInvalidationInfo *myInfo;
821
822 if (transInvalInfo != NULL &&
823 transInvalInfo->my_level == GetCurrentTransactionNestLevel())
824 return;
825
826 myInfo = (TransInvalidationInfo *)
827 MemoryContextAllocZero(TopTransactionContext,
828 sizeof(TransInvalidationInfo));
829 myInfo->parent = transInvalInfo;
830 myInfo->my_level = GetCurrentTransactionNestLevel();
831
832 /*
833 * If there's any previous entry, this one should be for a deeper nesting
834 * level.
835 */
836 Assert(transInvalInfo == NULL ||
837 myInfo->my_level > transInvalInfo->my_level);
838
839 transInvalInfo = myInfo;
840}
841
842/*
843 * PostPrepare_Inval

Callers 6

CacheInvalidateHeapTupleFunction · 0.85
CacheInvalidateCatalogFunction · 0.85
CacheInvalidateRelcacheFunction · 0.85

Calls 2

MemoryContextAllocZeroFunction · 0.85

Tested by

no test coverage detected