/* * RegisterRelcacheInvalidation * * As above, but register a relcache invalidation event. */ static void RegisterRelcacheInvalidation(Oid dbId, Oid relId) { AddRelcacheInvalidationMessage(&transInvalInfo->CurrentCmdInvalidMsgs, dbId, relId); /* * If the relation being invalidated is one of those cached in the * relcache init file, mark that we need to zap that file at commit. */ if (RelationIdIsInInitFile(relId)) transInvalInfo->RelcacheInitFileInval = true; }
/* * RegisterRelcacheInvalidation * * As above, but register a relcache invalidation event. */ static void RegisterRelcacheInvalidation(Oid dbId, Oid relId) { AddRelcacheInvalidationMessage(&transInvalInfo->CurrentCmdInvalidMsgs, dbId, relId); /* * Most of the time, relcache invalidation is associated with system * catalog updates, but there are a few cases where it isn't. Quick hack * to ensure that the next CommandCounterIncrement() will think that we * need to do CommandEndInvalidationMessages(). */ (void) GetCurrentCommandId(true); /* * If the relation being invalidated is one of those cached in the * relcache init file, mark that we need to zap that file at commit. */ if (RelationIdIsInInitFile(relId)) transInvalInfo->RelcacheInitFileInval = true; }
/* * RegisterRelcacheInvalidation * * As above, but register a relcache invalidation event. */ static void RegisterRelcacheInvalidation(Oid dbId, Oid relId) { AddRelcacheInvalidationMessage(&transInvalInfo->CurrentCmdInvalidMsgs, dbId, relId); /* * Most of the time, relcache invalidation is associated with system * catalog updates, but there are a few cases where it isn't. Quick hack * to ensure that the next CommandCounterIncrement() will think that we * need to do CommandEndInvalidationMessages(). */ (void) GetCurrentCommandId(true); /* * If the relation being invalidated is one of those cached in a relcache * init file, mark that we need to zap that file at commit. For simplicity * invalidations for a specific database always invalidate the shared file * as well. Also zap when we are invalidating whole relcache. */ if (relId == InvalidOid || RelationIdIsInInitFile(relId)) transInvalInfo->RelcacheInitFileInval = true; }