PostgreSQL Source Code
git master
|
Go to the source code of this file.
Typedefs | |
typedef void(* | SyscacheCallbackFunction) (Datum arg, int cacheid, uint32 hashvalue) |
typedef void(* | RelcacheCallbackFunction) (Datum arg, Oid relid) |
Functions | |
void | AcceptInvalidationMessages (void) |
void | AtEOXact_Inval (bool isCommit) |
void | AtEOSubXact_Inval (bool isCommit) |
void | PostPrepare_Inval (void) |
void | CommandEndInvalidationMessages (void) |
void | CacheInvalidateHeapTuple (Relation relation, HeapTuple tuple, HeapTuple newtuple) |
void | CacheInvalidateCatalog (Oid catalogId) |
void | CacheInvalidateRelcache (Relation relation) |
void | CacheInvalidateRelcacheAll (void) |
void | CacheInvalidateRelcacheByTuple (HeapTuple classTuple) |
void | CacheInvalidateRelcacheByRelid (Oid relid) |
void | CacheInvalidateSmgr (RelFileLocatorBackend rlocator) |
void | CacheInvalidateRelmap (Oid databaseId) |
void | CacheRegisterSyscacheCallback (int cacheid, SyscacheCallbackFunction func, Datum arg) |
void | CacheRegisterRelcacheCallback (RelcacheCallbackFunction func, Datum arg) |
void | CallSyscacheCallbacks (int cacheid, uint32 hashvalue) |
void | InvalidateSystemCaches (void) |
void | InvalidateSystemCachesExtended (bool debug_discard) |
void | LogLogicalInvalidations (void) |
Variables | |
PGDLLIMPORT int | debug_discard_caches |
void AcceptInvalidationMessages | ( | void | ) |
Definition at line 806 of file inval.c.
References debug_discard_caches, InvalidateSystemCaches(), InvalidateSystemCachesExtended(), LocalExecuteInvalidationMessage(), ReceiveSharedInvalidMessages(), and recursion_depth.
Referenced by apply_handle_commit_internal(), AtStart_Cache(), ConditionalLockDatabaseObject(), ConditionalLockRelation(), ConditionalLockRelationOid(), ConditionalLockSharedObject(), delay_execution_planner(), InitializeSessionUserId(), LockDatabaseObject(), LockRelation(), LockRelationId(), LockRelationOid(), LockSharedObject(), LogicalRepApplyLoop(), pgstat_init_function_usage(), ProcessCatchupInterrupt(), RangeVarGetRelidExtended(), relation_openrv(), relation_openrv_extended(), RelationBuildPartitionDesc(), RemoveRelations(), and write_relcache_init_file().
void AtEOSubXact_Inval | ( | bool | isCommit | ) |
Definition at line 1082 of file inval.c.
References AppendInvalidationMessages(), Assert, CommandEndInvalidationMessages(), TransInvalidationInfo::CurrentCmdInvalidMsgs, GetCurrentTransactionNestLevel(), LocalExecuteInvalidationMessage(), TransInvalidationInfo::my_level, TransInvalidationInfo::parent, pfree(), TransInvalidationInfo::PriorCmdInvalidMsgs, ProcessInvalidationMessages(), TransInvalidationInfo::RelcacheInitFileInval, SetGroupToFollow, and transInvalInfo.
Referenced by AbortSubTransaction(), and CommitSubTransaction().
void AtEOXact_Inval | ( | bool | isCommit | ) |
Definition at line 1025 of file inval.c.
References AppendInvalidationMessages(), Assert, TransInvalidationInfo::CurrentCmdInvalidMsgs, LocalExecuteInvalidationMessage(), TransInvalidationInfo::my_level, TransInvalidationInfo::parent, TransInvalidationInfo::PriorCmdInvalidMsgs, ProcessInvalidationMessages(), ProcessInvalidationMessagesMulti(), RelationCacheInitFilePostInvalidate(), RelationCacheInitFilePreInvalidate(), TransInvalidationInfo::RelcacheInitFileInval, SendSharedInvalidMessages(), and transInvalInfo.
Referenced by AbortTransaction(), CommitTransaction(), and PostPrepare_Inval().
void CacheInvalidateCatalog | ( | Oid | catalogId | ) |
Definition at line 1336 of file inval.c.
References InvalidOid, IsSharedRelation(), MyDatabaseId, PrepareInvalidationState(), and RegisterCatalogInvalidation().
Referenced by finish_heap_swap().
Definition at line 1204 of file inval.c.
References GETSTRUCT, InvalidOid, IsBootstrapProcessingMode, IsCatalogRelation(), IsSharedRelation(), IsToastRelation(), MyDatabaseId, OidIsValid, PrepareInvalidationState(), PrepareToInvalidateCacheTuple(), RegisterCatcacheInvalidation(), RegisterRelcacheInvalidation(), RegisterSnapshotInvalidation(), RelationGetRelid, and RelationInvalidatesSnapshotsOnly().
Referenced by AlterDomainAddConstraint(), AlterDomainDropConstraint(), heap_delete(), heap_inplace_update(), heap_insert(), heap_multi_insert(), and heap_update().
void CacheInvalidateRelcache | ( | Relation | relation | ) |
Definition at line 1360 of file inval.c.
References InvalidOid, MyDatabaseId, PrepareInvalidationState(), RelationData::rd_rel, RegisterRelcacheInvalidation(), and RelationGetRelid.
Referenced by AlterPolicy(), ATExecAlterConstrRecurse(), ATExecDetachPartition(), ATExecGenericOptions(), ATExecValidateConstraint(), CreatePolicy(), CreateStatistics(), DetachPartitionFinalize(), EnableDisableRule(), EnableDisableTrigger(), index_concurrently_set_dead(), index_constraint_create(), index_create(), index_drop(), reindex_index(), relation_mark_replica_identity(), RelationSetNewRelfilenumber(), RemovePolicyById(), RemoveRewriteRuleById(), RemoveTriggerById(), rename_constraint_internal(), rename_policy(), RenameRewriteRule(), renametrig_internal(), SetRelationNumChecks(), StorePartitionBound(), and StorePartitionKey().
void CacheInvalidateRelcacheAll | ( | void | ) |
Definition at line 1384 of file inval.c.
References InvalidOid, PrepareInvalidationState(), and RegisterRelcacheInvalidation().
Referenced by AlterPublicationOptions(), CreatePublication(), InvalidatePublicationRels(), and RemovePublicationById().
void CacheInvalidateRelcacheByRelid | ( | Oid | relid | ) |
Definition at line 1419 of file inval.c.
References CacheInvalidateRelcacheByTuple(), elog, ERROR, HeapTupleIsValid, ObjectIdGetDatum(), PrepareInvalidationState(), ReleaseSysCache(), and SearchSysCache1().
Referenced by ATExecAlterConstraint(), ATExecAttachPartition(), DefineIndex(), DetachPartitionFinalize(), heap_drop_with_catalog(), InvalidatePublicationRels(), ReindexRelationConcurrently(), RemoveStatisticsById(), and StorePartitionBound().
void CacheInvalidateRelcacheByTuple | ( | HeapTuple | classTuple | ) |
Definition at line 1396 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 1489 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 CacheInvalidateSmgr | ( | RelFileLocatorBackend | rlocator | ) |
Definition at line 1459 of file inval.c.
References RelFileLocatorBackend::backend, SharedInvalSmgrMsg::backend_hi, SharedInvalSmgrMsg::backend_lo, SharedInvalSmgrMsg::id, RelFileLocatorBackend::locator, SharedInvalSmgrMsg::rlocator, SendSharedInvalidMessages(), SHAREDINVALSMGR_ID, SharedInvalidationMessage::sm, and VALGRIND_MAKE_MEM_DEFINED.
Referenced by smgrdounlinkall(), smgrtruncate(), and vm_extend().
void CacheRegisterRelcacheCallback | ( | RelcacheCallbackFunction | func, |
Datum | arg | ||
) |
Definition at line 1558 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 CacheRegisterSyscacheCallback | ( | int | cacheid, |
SyscacheCallbackFunction | func, | ||
Datum | arg | ||
) |
Definition at line 1516 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 CallSyscacheCallbacks | ( | int | cacheid, |
uint32 | hashvalue | ||
) |
Definition at line 1577 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 1170 of file inval.c.
References AppendInvalidationMessages(), TransInvalidationInfo::CurrentCmdInvalidMsgs, LocalExecuteInvalidationMessage(), LogLogicalInvalidations(), TransInvalidationInfo::PriorCmdInvalidMsgs, ProcessInvalidationMessages(), transInvalInfo, and XLogLogicalInfoActive.
Referenced by AtCCI_LocalCache(), and AtEOSubXact_Inval().
void InvalidateSystemCaches | ( | void | ) |
Definition at line 792 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 674 of file inval.c.
References SYSCACHECALLBACK::arg, RELCACHECALLBACK::arg, SYSCACHECALLBACK::function, RELCACHECALLBACK::function, i, SYSCACHECALLBACK::id, InvalidateCatalogSnapshot(), InvalidOid, RelationCacheInvalidate(), relcache_callback_count, relcache_callback_list, ResetCatalogCaches(), syscache_callback_count, and syscache_callback_list.
Referenced by AcceptInvalidationMessages(), and InvalidateSystemCaches().
void LogLogicalInvalidations | ( | void | ) |
Definition at line 1604 of file inval.c.
References CatCacheMsgs, TransInvalidationInfo::CurrentCmdInvalidMsgs, 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 863 of file inval.c.
References AtEOXact_Inval().
Referenced by PrepareTransaction().
|
extern |
Definition at line 240 of file inval.c.
Referenced by AcceptInvalidationMessages(), LookupOpclassInfo(), and RelationBuildDesc().