PostgreSQL Source Code git master
|
#include "postgres.h"
#include <limits.h>
#include "access/htup_details.h"
#include "access/xact.h"
#include "access/xloginsert.h"
#include "catalog/catalog.h"
#include "catalog/pg_constraint.h"
#include "miscadmin.h"
#include "storage/procnumber.h"
#include "storage/sinval.h"
#include "storage/smgr.h"
#include "utils/catcache.h"
#include "utils/injection_point.h"
#include "utils/inval.h"
#include "utils/memdebug.h"
#include "utils/memutils.h"
#include "utils/rel.h"
#include "utils/relmapper.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
Go to the source code of this file.
Data Structures | |
struct | InvalMessageArray |
struct | InvalidationMsgsGroup |
struct | InvalidationInfo |
struct | TransInvalidationInfo |
struct | SYSCACHECALLBACK |
struct | RELCACHECALLBACK |
struct | RELSYNCCALLBACK |
Macros | |
#define | CatCacheMsgs 0 |
#define | RelCacheMsgs 1 |
#define | SetSubGroupToFollow(targetgroup, priorgroup, subgroup) |
#define | SetGroupToFollow(targetgroup, priorgroup) |
#define | NumMessagesInSubGroup(group, subgroup) ((group)->nextmsg[subgroup] - (group)->firstmsg[subgroup]) |
#define | NumMessagesInGroup(group) |
#define | MAX_SYSCACHE_CALLBACKS 64 |
#define | MAX_RELCACHE_CALLBACKS 10 |
#define | MAX_RELSYNC_CALLBACKS 10 |
#define | ProcessMessageSubGroup(group, subgroup, codeFragment) |
#define | ProcessMessageSubGroupMulti(group, subgroup, codeFragment) |
Typedefs | |
typedef struct InvalMessageArray | InvalMessageArray |
typedef struct InvalidationMsgsGroup | InvalidationMsgsGroup |
typedef struct InvalidationInfo | InvalidationInfo |
typedef struct TransInvalidationInfo | TransInvalidationInfo |
Variables | |
static InvalMessageArray | InvalMessageArrays [2] |
static TransInvalidationInfo * | transInvalInfo = NULL |
static InvalidationInfo * | inplaceInvalInfo = NULL |
int | debug_discard_caches = 0 |
static struct SYSCACHECALLBACK | syscache_callback_list [MAX_SYSCACHE_CALLBACKS] |
static int16 | syscache_callback_links [SysCacheSize] |
static int | syscache_callback_count = 0 |
static struct RELCACHECALLBACK | relcache_callback_list [MAX_RELCACHE_CALLBACKS] |
static int | relcache_callback_count = 0 |
static struct RELSYNCCALLBACK | relsync_callback_list [MAX_RELSYNC_CALLBACKS] |
static int | relsync_callback_count = 0 |
#define NumMessagesInGroup | ( | group | ) |
#define NumMessagesInSubGroup | ( | group, | |
subgroup | |||
) | ((group)->nextmsg[subgroup] - (group)->firstmsg[subgroup]) |
#define ProcessMessageSubGroup | ( | group, | |
subgroup, | |||
codeFragment | |||
) |
#define ProcessMessageSubGroupMulti | ( | group, | |
subgroup, | |||
codeFragment | |||
) |
#define SetGroupToFollow | ( | targetgroup, | |
priorgroup | |||
) |
#define SetSubGroupToFollow | ( | targetgroup, | |
priorgroup, | |||
subgroup | |||
) |
typedef struct InvalidationInfo InvalidationInfo |
typedef struct InvalidationMsgsGroup InvalidationMsgsGroup |
typedef struct InvalMessageArray InvalMessageArray |
typedef struct TransInvalidationInfo TransInvalidationInfo |
void AcceptInvalidationMessages | ( | void | ) |
Definition at line 930 of file inval.c.
References AssertCouldGetRelation(), debug_discard_caches, InvalidateSystemCaches(), InvalidateSystemCachesExtended(), IsTransactionState(), LocalExecuteInvalidationMessage(), ReceiveSharedInvalidMessages(), and recursion_depth.
Referenced by apply_handle_commit_internal(), AtStart_Cache(), ConditionalLockDatabaseObject(), ConditionalLockRelation(), ConditionalLockRelationOid(), ConditionalLockSharedObject(), delay_execution_planner(), heap_inplace_update_and_unlock(), InitializeSessionUserId(), LockDatabaseObject(), LockRelation(), LockRelationId(), LockRelationOid(), LockSharedObject(), LogicalRepApplyLoop(), pgstat_init_function_usage(), ProcessCatchupInterrupt(), RangeVarGetRelidExtended(), relation_openrv(), relation_openrv_extended(), RelationBuildPartitionDesc(), RemoveRelations(), SearchSysCacheLocked1(), and write_relcache_init_file().
|
static |
Definition at line 453 of file inval.c.
References AddInvalidationMessage(), SharedInvalidationMessage::cat, CatCacheMsgs, SharedInvalCatalogMsg::catId, SharedInvalCatalogMsg::dbId, SharedInvalCatalogMsg::id, SHAREDINVALCATALOG_ID, and VALGRIND_MAKE_MEM_DEFINED.
Referenced by RegisterCatalogInvalidation().
|
static |
Definition at line 425 of file inval.c.
References AddInvalidationMessage(), Assert(), CatCacheMsgs, SharedInvalidationMessage::cc, SharedInvalCatcacheMsg::dbId, SharedInvalCatcacheMsg::hashValue, SharedInvalCatcacheMsg::id, and VALGRIND_MAKE_MEM_DEFINED.
Referenced by RegisterCatcacheInvalidation().
|
static |
Definition at line 320 of file inval.c.
References Assert(), InvalMessageArrays, InvalMessageArray::maxmsgs, MemoryContextAlloc(), InvalMessageArray::msgs, InvalidationMsgsGroup::nextmsg, repalloc(), and TopTransactionContext.
Referenced by AddCatalogInvalidationMessage(), AddCatcacheInvalidationMessage(), AddRelcacheInvalidationMessage(), AddRelsyncInvalidationMessage(), and AddSnapshotInvalidationMessage().
|
static |
Definition at line 471 of file inval.c.
References AddInvalidationMessage(), SharedInvalRelcacheMsg::dbId, SharedInvalRelcacheMsg::id, InvalidOid, ProcessMessageSubGroup, SharedInvalidationMessage::rc, RelCacheMsgs, SharedInvalRelcacheMsg::relId, SHAREDINVALRELCACHE_ID, and VALGRIND_MAKE_MEM_DEFINED.
Referenced by RegisterRelcacheInvalidation().
|
static |
Definition at line 505 of file inval.c.
References AddInvalidationMessage(), SharedInvalRelcacheMsg::dbId, SharedInvalRelcacheMsg::id, InvalidOid, ProcessMessageSubGroup, SharedInvalidationMessage::rc, RelCacheMsgs, SharedInvalRelcacheMsg::relId, SHAREDINVALRELSYNC_ID, and VALGRIND_MAKE_MEM_DEFINED.
Referenced by RegisterRelsyncInvalidation().
|
static |
Definition at line 533 of file inval.c.
References AddInvalidationMessage(), SharedInvalSnapshotMsg::dbId, SharedInvalSnapshotMsg::id, ProcessMessageSubGroup, RelCacheMsgs, SharedInvalSnapshotMsg::relId, SHAREDINVALSNAPSHOT_ID, SharedInvalidationMessage::sn, and VALGRIND_MAKE_MEM_DEFINED.
Referenced by RegisterSnapshotInvalidation().
|
static |
Definition at line 560 of file inval.c.
References AppendInvalidationMessageSubGroup(), CatCacheMsgs, generate_unaccent_rules::dest, and RelCacheMsgs.
Referenced by AtEOSubXact_Inval(), AtEOXact_Inval(), and CommandEndInvalidationMessages().
|
static |
Definition at line 360 of file inval.c.
References Assert(), generate_unaccent_rules::dest, InvalidationMsgsGroup::firstmsg, InvalidationMsgsGroup::nextmsg, and SetSubGroupToFollow.
Referenced by AppendInvalidationMessages().
void AtEOSubXact_Inval | ( | bool | isCommit | ) |
Definition at line 1310 of file inval.c.
References AppendInvalidationMessages(), Assert(), CommandEndInvalidationMessages(), InvalidationInfo::CurrentCmdInvalidMsgs, GetCurrentTransactionNestLevel(), TransInvalidationInfo::ii, inplaceInvalInfo, LocalExecuteInvalidationMessage(), TransInvalidationInfo::my_level, TransInvalidationInfo::parent, pfree(), TransInvalidationInfo::PriorCmdInvalidMsgs, ProcessInvalidationMessages(), InvalidationInfo::RelcacheInitFileInval, SetGroupToFollow, and transInvalInfo.
Referenced by AbortSubTransaction(), and CommitSubTransaction().
void AtEOXact_Inval | ( | bool | isCommit | ) |
Definition at line 1199 of file inval.c.
References AppendInvalidationMessages(), Assert(), InvalidationInfo::CurrentCmdInvalidMsgs, TransInvalidationInfo::ii, INJECTION_POINT, inplaceInvalInfo, LocalExecuteInvalidationMessage(), TransInvalidationInfo::my_level, TransInvalidationInfo::parent, TransInvalidationInfo::PriorCmdInvalidMsgs, ProcessInvalidationMessages(), ProcessInvalidationMessagesMulti(), RelationCacheInitFilePostInvalidate(), RelationCacheInitFilePreInvalidate(), InvalidationInfo::RelcacheInitFileInval, SendSharedInvalidMessages(), and transInvalInfo.
Referenced by AbortTransaction(), CommitTransaction(), and PostPrepare_Inval().
void AtInplace_Inval | ( | void | ) |
Definition at line 1263 of file inval.c.
References Assert(), CritSectionCount, InvalidationInfo::CurrentCmdInvalidMsgs, inplaceInvalInfo, ProcessInvalidationMessagesMulti(), RelationCacheInitFilePostInvalidate(), InvalidationInfo::RelcacheInitFileInval, and SendSharedInvalidMessages().
Referenced by heap_inplace_update_and_unlock().
void CacheInvalidateCatalog | ( | Oid | catalogId | ) |
Definition at line 1608 of file inval.c.
References InvalidOid, IsSharedRelation(), MyDatabaseId, PrepareInvalidationState(), and RegisterCatalogInvalidation().
Referenced by finish_heap_swap().
Definition at line 1571 of file inval.c.
References CacheInvalidateHeapTupleCommon(), and PrepareInvalidationState().
Referenced by AlterDomainAddConstraint(), AlterDomainDropConstraint(), heap_delete(), heap_inplace_update_and_unlock(), heap_insert(), heap_multi_insert(), and heap_update().
|
static |
Definition at line 1436 of file inval.c.
References AssertCouldGetRelation(), GETSTRUCT(), InvalidOid, IsBootstrapProcessingMode, IsCatalogRelation(), IsSharedRelation(), IsToastRelation(), MyDatabaseId, OidIsValid, PrepareToInvalidateCacheTuple(), RegisterCatcacheInvalidation(), RegisterRelcacheInvalidation(), RegisterSnapshotInvalidation(), RelationGetRelid, and RelationInvalidatesSnapshotsOnly().
Referenced by CacheInvalidateHeapTuple(), and CacheInvalidateHeapTupleInplace().
Definition at line 1588 of file inval.c.
References CacheInvalidateHeapTupleCommon(), and PrepareInplaceInvalidationState().
Referenced by heap_inplace_lock().
void CacheInvalidateRelcache | ( | Relation | relation | ) |
Definition at line 1631 of file inval.c.
References InvalidOid, MyDatabaseId, PrepareInvalidationState(), RelationData::rd_rel, RegisterRelcacheInvalidation(), and RelationGetRelid.
Referenced by AlterPolicy(), ATExecDetachPartition(), ATExecGenericOptions(), CreatePolicy(), CreateStatistics(), DetachPartitionFinalize(), EnableDisableRule(), EnableDisableTrigger(), index_concurrently_set_dead(), index_constraint_create(), index_create(), index_drop(), QueueCheckConstraintValidation(), QueueNNConstraintValidation(), reindex_index(), relation_mark_replica_identity(), RelationSetNewRelfilenumber(), RemovePolicyById(), RemoveRewriteRuleById(), RemoveTriggerById(), rename_constraint_internal(), rename_policy(), RenameRewriteRule(), renametrig_internal(), set_attnotnull(), SetRelationNumChecks(), StorePartitionBound(), and StorePartitionKey().
void CacheInvalidateRelcacheAll | ( | void | ) |
Definition at line 1654 of file inval.c.
References InvalidOid, PrepareInvalidationState(), and RegisterRelcacheInvalidation().
Referenced by AlterPublicationOptions(), CreatePublication(), InvalidatePublicationRels(), and RemovePublicationById().
void CacheInvalidateRelcacheByRelid | ( | Oid | relid | ) |
Definition at line 1687 of file inval.c.
References CacheInvalidateRelcacheByTuple(), elog, ERROR, HeapTupleIsValid, ObjectIdGetDatum(), ReleaseSysCache(), and SearchSysCache1().
Referenced by AlterConstrUpdateConstraintEntry(), ATExecAlterConstraintInternal(), ATExecAttachPartition(), DefineIndex(), DetachPartitionFinalize(), heap_drop_with_catalog(), InvalidatePublicationRels(), ReindexRelationConcurrently(), RemoveStatisticsById(), and StorePartitionBound().
void CacheInvalidateRelcacheByTuple | ( | HeapTuple | classTuple | ) |
Definition at line 1665 of file inval.c.
References GETSTRUCT(), InvalidOid, MyDatabaseId, PrepareInvalidationState(), and RegisterRelcacheInvalidation().
Referenced by CacheInvalidateRelcacheByRelid(), copy_table_data(), CreateTriggerFiringOn(), index_update_stats(), RemoveRoleFromObjectPolicy(), SetRelationHasSubclass(), SetRelationRuleStatus(), and swap_relation_files().
void CacheInvalidateRelmap | ( | Oid | databaseId | ) |
Definition at line 1785 of file inval.c.
References SharedInvalRelmapMsg::dbId, SharedInvalRelmapMsg::id, SharedInvalidationMessage::rm, SendSharedInvalidMessages(), SHAREDINVALRELMAP_ID, and VALGRIND_MAKE_MEM_DEFINED.
Referenced by write_relmap_file().
void CacheInvalidateRelSync | ( | Oid | relid | ) |
Definition at line 1708 of file inval.c.
References MyDatabaseId, PrepareInvalidationState(), and RegisterRelsyncInvalidation().
Referenced by CacheInvalidateRelSyncAll(), and InvalidatePubRelSyncCache().
void CacheInvalidateRelSyncAll | ( | void | ) |
Definition at line 1720 of file inval.c.
References CacheInvalidateRelSync(), and InvalidOid.
Referenced by InvalidatePubRelSyncCache().
void CacheInvalidateSmgr | ( | RelFileLocatorBackend | rlocator | ) |
Definition at line 1751 of file inval.c.
References RelFileLocatorBackend::backend, SharedInvalSmgrMsg::backend_hi, SharedInvalSmgrMsg::backend_lo, SharedInvalSmgrMsg::id, RelFileLocatorBackend::locator, MAX_BACKENDS_BITS, SharedInvalSmgrMsg::rlocator, SendSharedInvalidMessages(), SHAREDINVALSMGR_ID, SharedInvalidationMessage::sm, StaticAssertStmt, and VALGRIND_MAKE_MEM_DEFINED.
Referenced by smgrdounlinkall(), smgrtruncate(), and vm_extend().
void CacheRegisterRelcacheCallback | ( | RelcacheCallbackFunction | func, |
Datum | arg | ||
) |
Definition at line 1854 of file inval.c.
References RELCACHECALLBACK::arg, arg, elog, FATAL, RELCACHECALLBACK::function, MAX_RELCACHE_CALLBACKS, relcache_callback_count, and relcache_callback_list.
Referenced by init_rel_sync_cache(), InitializeRelfilenumberMap(), InitPlanCache(), logicalrep_partmap_init(), logicalrep_relmap_init(), and lookup_type_cache().
void CacheRegisterRelSyncCallback | ( | RelSyncCallbackFunction | func, |
Datum | arg | ||
) |
Definition at line 1875 of file inval.c.
References RELSYNCCALLBACK::arg, arg, elog, FATAL, RELSYNCCALLBACK::function, MAX_RELSYNC_CALLBACKS, relsync_callback_count, and relsync_callback_list.
Referenced by pgoutput_startup().
void CacheRegisterSyscacheCallback | ( | int | cacheid, |
SyscacheCallbackFunction | func, | ||
Datum | arg | ||
) |
Definition at line 1812 of file inval.c.
References SYSCACHECALLBACK::arg, arg, elog, FATAL, SYSCACHECALLBACK::function, i, SYSCACHECALLBACK::id, SYSCACHECALLBACK::link, MAX_SYSCACHE_CALLBACKS, syscache_callback_count, syscache_callback_links, and syscache_callback_list.
Referenced by BuildEventTriggerCache(), find_oper_cache_entry(), GetConnection(), init_rel_sync_cache(), init_ts_config_cache(), initialize_acl(), InitializeAttoptCache(), InitializeLogRepWorker(), InitializeSearchPath(), InitializeShippableCache(), InitializeTableSpaceCache(), InitPlanCache(), lookup_proof_cache(), lookup_ts_dictionary_cache(), lookup_ts_parser_cache(), lookup_type_cache(), ParallelApplyWorkerMain(), pgoutput_startup(), ri_InitHashTables(), SetupApplyOrSyncWorker(), and superuser_arg().
void CallRelSyncCallbacks | ( | Oid | relid | ) |
Definition at line 1916 of file inval.c.
References RELSYNCCALLBACK::arg, RELSYNCCALLBACK::function, i, relsync_callback_count, and relsync_callback_list.
Referenced by LocalExecuteInvalidationMessage().
void CallSyscacheCallbacks | ( | int | cacheid, |
uint32 | hashvalue | ||
) |
Definition at line 1894 of file inval.c.
References SYSCACHECALLBACK::arg, Assert(), elog, ERROR, SYSCACHECALLBACK::function, i, SYSCACHECALLBACK::id, SYSCACHECALLBACK::link, syscache_callback_links, and syscache_callback_list.
Referenced by CatalogCacheFlushCatalog(), and LocalExecuteInvalidationMessage().
void CommandEndInvalidationMessages | ( | void | ) |
Definition at line 1409 of file inval.c.
References AppendInvalidationMessages(), InvalidationInfo::CurrentCmdInvalidMsgs, TransInvalidationInfo::ii, LocalExecuteInvalidationMessage(), LogLogicalInvalidations(), TransInvalidationInfo::PriorCmdInvalidMsgs, ProcessInvalidationMessages(), transInvalInfo, and XLogLogicalInfoActive.
Referenced by AtCCI_LocalCache(), and AtEOSubXact_Inval().
void ForgetInplace_Inval | ( | void | ) |
Definition at line 1286 of file inval.c.
References inplaceInvalInfo.
Referenced by heap_inplace_lock(), and heap_inplace_unlock().
int inplaceGetInvalidationMessages | ( | SharedInvalidationMessage ** | msgs, |
bool * | RelcacheInitFileInval | ||
) |
Definition at line 1088 of file inval.c.
References Assert(), CatCacheMsgs, InvalidationInfo::CurrentCmdInvalidMsgs, inplaceInvalInfo, NumMessagesInGroup, palloc(), ProcessMessageSubGroupMulti, InvalidationInfo::RelcacheInitFileInval, and RelCacheMsgs.
Referenced by heap_inplace_update_and_unlock().
void InvalidateSystemCaches | ( | void | ) |
Definition at line 916 of file inval.c.
References InvalidateSystemCachesExtended().
Referenced by AcceptInvalidationMessages(), LogicalReplicationSlotHasPendingWal(), LogicalSlotAdvanceAndCheckSnapState(), ParallelWorkerMain(), and pg_logical_slot_get_changes_guts().
void InvalidateSystemCachesExtended | ( | bool | debug_discard | ) |
Definition at line 785 of file inval.c.
References SYSCACHECALLBACK::arg, RELCACHECALLBACK::arg, RELSYNCCALLBACK::arg, SYSCACHECALLBACK::function, RELCACHECALLBACK::function, RELSYNCCALLBACK::function, i, SYSCACHECALLBACK::id, InvalidateCatalogSnapshot(), InvalidOid, RelationCacheInvalidate(), relcache_callback_count, relcache_callback_list, relsync_callback_count, relsync_callback_list, ResetCatalogCachesExt(), syscache_callback_count, and syscache_callback_list.
Referenced by AcceptInvalidationMessages(), and InvalidateSystemCaches().
void LocalExecuteInvalidationMessage | ( | SharedInvalidationMessage * | msg | ) |
Definition at line 823 of file inval.c.
References RELCACHECALLBACK::arg, RelFileLocatorBackend::backend, SharedInvalSmgrMsg::backend_hi, SharedInvalSmgrMsg::backend_lo, CallRelSyncCallbacks(), CallSyscacheCallbacks(), SharedInvalidationMessage::cat, CatalogCacheFlushCatalog(), SharedInvalCatalogMsg::catId, SharedInvalidationMessage::cc, SharedInvalCatcacheMsg::dbId, SharedInvalCatalogMsg::dbId, SharedInvalRelcacheMsg::dbId, SharedInvalRelmapMsg::dbId, SharedInvalSnapshotMsg::dbId, SharedInvalRelSyncMsg::dbId, elog, FATAL, RELCACHECALLBACK::function, SharedInvalCatcacheMsg::hashValue, i, SharedInvalCatcacheMsg::id, SharedInvalidationMessage::id, InvalidateCatalogSnapshot(), InvalidOid, RelFileLocatorBackend::locator, MyDatabaseId, SharedInvalidationMessage::rc, RelationCacheInvalidate(), RelationCacheInvalidateEntry(), RelationMapInvalidate(), relcache_callback_count, relcache_callback_list, SharedInvalRelcacheMsg::relId, SharedInvalRelSyncMsg::relid, SharedInvalSmgrMsg::rlocator, SharedInvalidationMessage::rm, SharedInvalidationMessage::rs, SHAREDINVALCATALOG_ID, SHAREDINVALRELCACHE_ID, SHAREDINVALRELMAP_ID, SHAREDINVALRELSYNC_ID, SHAREDINVALSMGR_ID, SHAREDINVALSNAPSHOT_ID, SharedInvalidationMessage::sm, smgrreleaserellocator(), SharedInvalidationMessage::sn, and SysCacheInvalidate().
Referenced by AcceptInvalidationMessages(), AtEOSubXact_Inval(), AtEOXact_Inval(), CommandEndInvalidationMessages(), ReorderBufferExecuteInvalidations(), and ReorderBufferImmediateInvalidation().
void LogLogicalInvalidations | ( | void | ) |
Definition at line 1935 of file inval.c.
References CatCacheMsgs, InvalidationInfo::CurrentCmdInvalidMsgs, TransInvalidationInfo::ii, MinSizeOfXactInvals, xl_xact_invals::nmsgs, NumMessagesInGroup, ProcessMessageSubGroupMulti, RelCacheMsgs, transInvalInfo, XLOG_XACT_INVALIDATIONS, XLogBeginInsert(), XLogInsert(), and XLogRegisterData().
Referenced by CommandEndInvalidationMessages(), and RecordTransactionCommit().
void PostPrepare_Inval | ( | void | ) |
Definition at line 993 of file inval.c.
References AtEOXact_Inval().
Referenced by PrepareTransaction().
void PreInplace_Inval | ( | void | ) |
Definition at line 1250 of file inval.c.
References Assert(), CritSectionCount, inplaceInvalInfo, RelationCacheInitFilePreInvalidate(), and InvalidationInfo::RelcacheInitFileInval.
Referenced by heap_inplace_update_and_unlock().
|
static |
Definition at line 752 of file inval.c.
References Assert(), AssertCouldGetRelation(), CatCacheMsgs, InvalidationInfo::CurrentCmdInvalidMsgs, TransInvalidationInfo::ii, inplaceInvalInfo, InvalMessageArrays, InvalMessageArray::maxmsgs, InvalMessageArray::msgs, palloc0(), RelCacheMsgs, SetGroupToFollow, and transInvalInfo.
Referenced by CacheInvalidateHeapTupleInplace().
|
static |
Definition at line 682 of file inval.c.
References Assert(), AssertCouldGetRelation(), CatCacheMsgs, InvalidationInfo::CurrentCmdInvalidMsgs, elog, ERROR, GetCurrentTransactionNestLevel(), TransInvalidationInfo::ii, inplaceInvalInfo, InvalMessageArrays, InvalMessageArray::maxmsgs, MemoryContextAllocZero(), InvalMessageArray::msgs, TransInvalidationInfo::my_level, NumMessagesInGroup, TransInvalidationInfo::parent, TransInvalidationInfo::PriorCmdInvalidMsgs, RelCacheMsgs, SetGroupToFollow, TopTransactionContext, and transInvalInfo.
Referenced by CacheInvalidateCatalog(), CacheInvalidateHeapTuple(), CacheInvalidateRelcache(), CacheInvalidateRelcacheAll(), CacheInvalidateRelcacheByTuple(), and CacheInvalidateRelSync().
void ProcessCommittedInvalidationMessages | ( | SharedInvalidationMessage * | msgs, |
int | nmsgs, | ||
bool | RelcacheInitFileInval, | ||
Oid | dbid, | ||
Oid | tsid | ||
) |
Definition at line 1135 of file inval.c.
References DatabasePath, DEBUG4, elog, GetDatabasePath(), OidIsValid, pfree(), RelationCacheInitFilePostInvalidate(), RelationCacheInitFilePreInvalidate(), and SendSharedInvalidMessages().
Referenced by heap_xlog_inplace(), standby_redo(), and xact_redo_commit().
|
static |
Definition at line 574 of file inval.c.
References CatCacheMsgs, ProcessMessageSubGroup, and RelCacheMsgs.
Referenced by AtEOSubXact_Inval(), AtEOXact_Inval(), and CommandEndInvalidationMessages().
|
static |
Definition at line 586 of file inval.c.
References CatCacheMsgs, ProcessMessageSubGroupMulti, and RelCacheMsgs.
Referenced by AtEOXact_Inval(), and AtInplace_Inval().
|
static |
Definition at line 621 of file inval.c.
References AddCatalogInvalidationMessage(), and InvalidationInfo::CurrentCmdInvalidMsgs.
Referenced by CacheInvalidateCatalog().
|
static |
Definition at line 604 of file inval.c.
References AddCatcacheInvalidationMessage(), and InvalidationInfo::CurrentCmdInvalidMsgs.
Referenced by CacheInvalidateHeapTupleCommon().
|
static |
Definition at line 632 of file inval.c.
References AddRelcacheInvalidationMessage(), InvalidationInfo::CurrentCmdInvalidMsgs, GetCurrentCommandId(), InvalidOid, RelationIdIsInInitFile(), and InvalidationInfo::RelcacheInitFileInval.
Referenced by CacheInvalidateHeapTupleCommon(), CacheInvalidateRelcache(), CacheInvalidateRelcacheAll(), and CacheInvalidateRelcacheByTuple().
|
static |
Definition at line 660 of file inval.c.
References AddRelsyncInvalidationMessage(), and InvalidationInfo::CurrentCmdInvalidMsgs.
Referenced by CacheInvalidateRelSync().
|
static |
Definition at line 672 of file inval.c.
References AddSnapshotInvalidationMessage(), and InvalidationInfo::CurrentCmdInvalidMsgs.
Referenced by CacheInvalidateHeapTupleCommon().
int xactGetCommittedInvalidationMessages | ( | SharedInvalidationMessage ** | msgs, |
bool * | RelcacheInitFileInval | ||
) |
Definition at line 1012 of file inval.c.
References Assert(), CatCacheMsgs, InvalidationInfo::CurrentCmdInvalidMsgs, CurTransactionContext, TransInvalidationInfo::ii, MemoryContextAlloc(), TransInvalidationInfo::my_level, NumMessagesInGroup, TransInvalidationInfo::parent, TransInvalidationInfo::PriorCmdInvalidMsgs, ProcessMessageSubGroupMulti, InvalidationInfo::RelcacheInitFileInval, RelCacheMsgs, and transInvalInfo.
Referenced by RecordTransactionCommit(), and StartPrepare().
int debug_discard_caches = 0 |
Definition at line 260 of file inval.c.
Referenced by AcceptInvalidationMessages(), LookupOpclassInfo(), and RelationBuildDesc().
|
static |
Definition at line 257 of file inval.c.
Referenced by AtEOSubXact_Inval(), AtEOXact_Inval(), AtInplace_Inval(), ForgetInplace_Inval(), inplaceGetInvalidationMessages(), PreInplace_Inval(), PrepareInplaceInvalidationState(), and PrepareInvalidationState().
|
static |
Definition at line 181 of file inval.c.
Referenced by AddInvalidationMessage(), PrepareInplaceInvalidationState(), and PrepareInvalidationState().
|
static |
Definition at line 294 of file inval.c.
Referenced by CacheRegisterRelcacheCallback(), InvalidateSystemCachesExtended(), and LocalExecuteInvalidationMessage().
|
static |
|
static |
Definition at line 302 of file inval.c.
Referenced by CacheRegisterRelSyncCallback(), CallRelSyncCallbacks(), and InvalidateSystemCachesExtended().
|
static |
Referenced by CacheRegisterRelSyncCallback(), CallRelSyncCallbacks(), and InvalidateSystemCachesExtended().
|
static |
Definition at line 286 of file inval.c.
Referenced by CacheRegisterSyscacheCallback(), and InvalidateSystemCachesExtended().
|
static |
Definition at line 284 of file inval.c.
Referenced by CacheRegisterSyscacheCallback(), and CallSyscacheCallbacks().
|
static |
Referenced by CacheRegisterSyscacheCallback(), CallSyscacheCallbacks(), and InvalidateSystemCachesExtended().
|
static |
Definition at line 255 of file inval.c.
Referenced by AtEOSubXact_Inval(), AtEOXact_Inval(), CommandEndInvalidationMessages(), LogLogicalInvalidations(), PrepareInplaceInvalidationState(), PrepareInvalidationState(), and xactGetCommittedInvalidationMessages().