|
PostgreSQL Source Code git master
|
#include "postgres.h"#include <sys/stat.h>#include <unistd.h>#include "access/subtrans.h"#include "access/transam.h"#include "access/xact.h"#include "datatype/timestamp.h"#include "lib/pairingheap.h"#include "miscadmin.h"#include "port/pg_lfind.h"#include "storage/fd.h"#include "storage/predicate.h"#include "storage/proc.h"#include "storage/procarray.h"#include "utils/builtins.h"#include "utils/injection_point.h"#include "utils/memutils.h"#include "utils/resowner.h"#include "utils/snapmgr.h"#include "utils/syscache.h"
Go to the source code of this file.
Data Structures | |
| struct | ActiveSnapshotElt |
| struct | ExportedSnapshot |
| struct | SerializedSnapshotData |
Macros | |
| #define | SNAPSHOT_EXPORT_DIR "pg_snapshots" |
Typedefs | |
| typedef struct ActiveSnapshotElt | ActiveSnapshotElt |
| typedef struct ExportedSnapshot | ExportedSnapshot |
| typedef struct SerializedSnapshotData | SerializedSnapshotData |
Definition at line 812 of file snapmgr.c.
References ActiveSnapshot, and fb().
Referenced by _SPI_execute_plan(), BuildCachedPlan(), do_autovacuum(), EnsurePortalSnapshotExists(), ExecWaitStmt(), find_inheritance_children_extended(), ForgetPortalSnapshots(), index_concurrently_build(), pg_plan_query(), PortalRunUtility(), postquel_start(), ReindexMultipleInternal(), RelationBuildPartitionDesc(), RelationGetPartitionDesc(), RevalidateCachedQuery(), and vacuum().
Definition at line 1016 of file snapmgr.c.
References ActiveSnapshot, ActiveSnapshotElt::as_next, Assert, CurrentSnapshot, elog, exportedSnapshots, fb(), FirstSnapshotSet, FirstXactSnapshot, InvalidateCatalogSnapshot(), lfirst, MyProc, NIL, pairingheap_is_empty, pairingheap_remove(), pairingheap_reset, SnapshotData::ph_node, SnapshotData::regd_count, RegisteredSnapshots, SecondarySnapshot, SnapshotResetXmin(), WARNING, and PGPROC::xmin.
Referenced by CleanupTransaction(), CommitTransaction(), and PrepareTransaction().
Definition at line 982 of file snapmgr.c.
References SnapshotData::active_count, ActiveSnapshot, ActiveSnapshotElt::as_level, ActiveSnapshotElt::as_next, ActiveSnapshotElt::as_snap, Assert, FreeSnapshot(), next, pfree(), SnapshotData::regd_count, and SnapshotResetXmin().
Referenced by AbortSubTransaction().
Definition at line 961 of file snapmgr.c.
References ActiveSnapshot, ActiveSnapshotElt::as_level, ActiveSnapshotElt::as_next, and fb().
Referenced by CommitSubTransaction().
Definition at line 608 of file snapmgr.c.
References Assert, fb(), InvalidSnapshot, MemoryContextAlloc(), SnapshotData::suboverflowed, SnapshotData::subxcnt, SnapshotData::subxip, SnapshotData::takenDuringRecovery, TopTransactionContext, SnapshotData::xcnt, and SnapshotData::xip.
Referenced by ExportSnapshot(), GetTransactionSnapshot(), PushActiveSnapshotWithLevel(), PushCopiedSnapshot(), RegisterSnapshotOnOwner(), and SetTransactionSnapshot().
Definition at line 1587 of file snapmgr.c.
References AllocateDir(), buf, ereport, errcode_for_file_access(), errmsg(), fb(), FreeDir(), LOG, MAXPGPATH, ReadDirExtended(), SNAPSHOT_EXPORT_DIR, and snprintf.
Referenced by StartupXLOG().
Definition at line 1712 of file snapmgr.c.
References add_size(), Assert, InvalidSnapshot, mul_size(), SNAPSHOT_MVCC, SnapshotData::snapshot_type, SnapshotData::suboverflowed, SnapshotData::subxcnt, SnapshotData::takenDuringRecovery, and SnapshotData::xcnt.
Referenced by index_parallelscan_estimate(), index_parallelscan_initialize(), InitializeParallelDSM(), and table_parallelscan_estimate().
Definition at line 1115 of file snapmgr.c.
References AllocateFile(), appendStringInfo(), appendStringInfoString(), buf, CopySnapshot(), ereport, errcode(), errcode_for_file_access(), errmsg(), ERROR, exportedSnapshots, fb(), FreeFile(), GetMaxSnapshotSubxidCount(), GetTopTransactionIdIfAny(), i, initStringInfo(), IsSubTransaction(), lappend(), list_length(), PGPROC::lxid, MAXPGPATH, MemoryContextSwitchTo(), MyDatabaseId, MyProc, MyProcPid, pairingheap_add(), palloc_object, PG_BINARY_W, SnapshotData::ph_node, PGPROC::procNumber, pstrdup(), SnapshotData::regd_count, RegisteredSnapshots, SNAPSHOT_EXPORT_DIR, snprintf, SnapshotData::suboverflowed, SnapshotData::subxcnt, SnapshotData::subxip, SnapshotData::takenDuringRecovery, TopTransactionContext, TransactionIdIsValid, TransactionIdPrecedes(), PGPROC::vxid, xactGetCommittedChildren(), XactIsoLevel, XactReadOnly, SnapshotData::xcnt, SnapshotData::xip, SnapshotData::xmax, and SnapshotData::xmin.
Referenced by pg_export_snapshot(), and SnapBuildExportSnapshot().
Definition at line 664 of file snapmgr.c.
References SnapshotData::active_count, Assert, SnapshotData::copied, pfree(), and SnapshotData::regd_count.
Referenced by AtSubAbort_Snapshot(), PopActiveSnapshot(), and UnregisterSnapshotNoOwner().
Definition at line 800 of file snapmgr.c.
References ActiveSnapshot, ActiveSnapshotElt::as_snap, Assert, and fb().
Referenced by _SPI_execute_plan(), ATExecDetachPartitionFinalize(), BeginCopyTo(), CopyRelationTo(), EnsurePortalSnapshotExists(), ExecCreateTableAs(), ExecInitParallelPlan(), ExecParallelGetQueryDesc(), execute_sql_string(), ExecuteQuery(), ExplainOnePlan(), find_inheritance_children_extended(), FindConflictTuple(), has_lo_priv_byid(), InitializeParallelDSM(), inv_open(), PerformCursorOpen(), pg_current_snapshot(), pg_export_snapshot(), pgrowlocks(), PortalRunUtility(), PortalStart(), postquel_start(), ProcessQuery(), refresh_matview_datafill(), RelationFindReplTupleByIndex(), RelationFindReplTupleSeq(), RelationGetPartitionDesc(), spgvacuumscan(), SPI_cursor_open_internal(), standard_ExecutorRun(), and standard_ExecutorStart().
Definition at line 385 of file snapmgr.c.
References GetNonHistoricCatalogSnapshot(), HistoricSnapshot, and HistoricSnapshotActive().
Referenced by process_settings(), systable_beginscan(), systable_beginscan_ordered(), systable_recheck_tuple(), and table_beginscan_catalog().
Definition at line 354 of file snapmgr.c.
References Assert, elog, ERROR, FirstSnapshotSet, GetSnapshotData(), GetTransactionSnapshot(), HistoricSnapshotActive(), IsInParallelMode(), SecondarySnapshot, and SecondarySnapshotData.
Referenced by asyncQueueReadAllNotifications(), ATRewriteTable(), check_default_partition_contents(), currtid_internal(), FindConflictTuple(), IndexCheckExclusion(), MergePartitionsMoveRows(), RelationFindReplTupleByIndex(), RelationFindReplTupleSeq(), RI_Initial_Check(), RI_PartitionRemove_Check(), ri_PerformCheck(), ScanSourceDatabasePgClass(), SplitPartitionMoveRows(), validateDomainCheckConstraint(), validateDomainNotNullConstraint(), and validateForeignKeyConstraint().
Definition at line 407 of file snapmgr.c.
References CatalogSnapshot, CatalogSnapshotData, fb(), GetSnapshotData(), InvalidateCatalogSnapshot(), pairingheap_add(), SnapshotData::ph_node, RegisteredSnapshots, RelationHasSysCache(), and RelationInvalidatesSnapshotsOnly().
Referenced by GetCatalogSnapshot(), and ScanPgRelation().
Definition at line 272 of file snapmgr.c.
References Assert, CopySnapshot(), CurrentSnapshot, CurrentSnapshotData, elog, ERROR, fb(), FirstSnapshotSet, FirstXactSnapshot, GetSerializableTransactionSnapshot(), GetSnapshotData(), HistoricSnapshot, HistoricSnapshotActive(), InvalidateCatalogSnapshot(), IsInParallelMode(), IsolationIsSerializable, IsolationUsesXactSnapshot, pairingheap_add(), pairingheap_is_empty, SnapshotData::ph_node, SnapshotData::regd_count, and RegisteredSnapshots.
Referenced by _brin_begin_parallel(), _bt_begin_parallel(), _gin_begin_parallel(), _SPI_execute_plan(), AfterTriggerFireDeferred(), AfterTriggerSetState(), ATExecDetachPartition(), begin_replication_step(), bt_check_every_level(), BuildCachedPlan(), CheckTargetForConflictsIn(), clear_subscription_skip_lsn(), cluster_multiple_rels(), DefineIndex(), detachPartitionTable(), DisableSubscriptionAndExit(), do_autovacuum(), EnsurePortalSnapshotExists(), EventTriggerOnLogin(), exec_bind_message(), exec_eval_simple_expr(), exec_parse_message(), exec_simple_query(), execute_sql_string(), ExecuteCallStmt(), fmgr_sql(), GetLatestSnapshot(), HandleFunctionRequest(), heapam_index_build_range_scan(), index_drop(), initialize_worker_spi(), InitializeParallelDSM(), LogicalRepSyncTableStart(), pg_get_constraintdef_worker(), PortalRunMulti(), PortalRunUtility(), PortalStart(), PreCommit_on_commit_actions(), ReindexMultipleInternal(), ReindexRelationConcurrently(), RemoveTempRelationsCallback(), RevalidateCachedQuery(), ri_PerformCheck(), run_apply_worker(), SPI_cursor_open_internal(), update_retention_status(), vacuum(), vacuum_rel(), verify_heapam(), worker_spi_main(), and XidIsConcurrent().
Definition at line 1644 of file snapmgr.c.
References ActiveSnapshot, CatalogSnapshot, fb(), pairingheap_is_empty, pairingheap_is_singular, and RegisteredSnapshots.
Referenced by AssertHasSnapshotForToast(), ExecWaitStmt(), get_toast_snapshot(), and SnapBuildInitialSnapshot().
Definition at line 1692 of file snapmgr.c.
References fb(), and HistoricSnapshot.
Referenced by GetCatalogSnapshot(), GetLatestSnapshot(), GetTransactionSnapshot(), HistoricSnapshotGetTupleCids(), RelationGetIdentityKeyBitmap(), RelationInitPhysicalAddr(), RelationRebuildRelation(), SetTransactionSnapshot(), and SnapBuildInitialSnapshot().
Definition at line 1698 of file snapmgr.c.
References Assert, HistoricSnapshotActive(), and tuplecid_data.
Referenced by HeapTupleSatisfiesHistoricMVCC().
Definition at line 1387 of file snapmgr.c.
References AllocateFile(), elog, ereport, errcode(), errcode_for_file_access(), errmsg(), ERROR, fb(), FirstSnapshotSet, FreeFile(), fstat, GetMaxSnapshotSubxidCount(), GetMaxSnapshotXidCount(), GetTopTransactionIdIfAny(), i, InvalidTransactionId, IsolationIsSerializable, IsolationUsesXactSnapshot, IsSubTransaction(), MAXPGPATH, MyDatabaseId, OidIsValid, palloc(), parseIntFromText(), parseVxidFromText(), parseXidFromText(), PG_BINARY_R, SetTransactionSnapshot(), SNAPSHOT_EXPORT_DIR, SNAPSHOT_MVCC, SnapshotData::snapshot_type, snprintf, SnapshotData::suboverflowed, SnapshotData::subxcnt, SnapshotData::subxip, SnapshotData::takenDuringRecovery, TransactionIdIsNormal, VirtualTransactionIdIsValid, XACT_SERIALIZABLE, XactReadOnly, SnapshotData::xcnt, SnapshotData::xip, SnapshotData::xmax, and SnapshotData::xmin.
Referenced by ExecSetVariableStmt().
Definition at line 455 of file snapmgr.c.
References CatalogSnapshot, fb(), INJECTION_POINT, pairingheap_remove(), SnapshotData::ph_node, RegisteredSnapshots, and SnapshotResetXmin().
Referenced by AtEOXact_Snapshot(), CopyFrom(), ExecWaitStmt(), GetNonHistoricCatalogSnapshot(), GetTransactionSnapshot(), heap_inplace_lock(), InitPostgres(), InvalidateCatalogSnapshotConditionally(), InvalidateSystemCachesExtended(), LocalExecuteInvalidationMessage(), SetTransactionSnapshot(), SnapBuildInitialSnapshot(), and wait_for_table_state_change().
Definition at line 477 of file snapmgr.c.
References ActiveSnapshot, CatalogSnapshot, fb(), InvalidateCatalogSnapshot(), pairingheap_is_singular, and RegisteredSnapshots.
Referenced by PostgresMain().
|
static |
Definition at line 1357 of file snapmgr.c.
References ereport, errcode(), errmsg(), ERROR, fb(), filename, VirtualTransactionId::localTransactionId, and VirtualTransactionId::procNumber.
Referenced by ImportSnapshot().
|
static |
| Datum pg_export_snapshot | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1292 of file snapmgr.c.
References cstring_to_text(), ExportSnapshot(), fb(), GetActiveSnapshot(), and PG_RETURN_TEXT_P.
Definition at line 775 of file snapmgr.c.
References SnapshotData::active_count, ActiveSnapshot, ActiveSnapshotElt::as_next, ActiveSnapshotElt::as_snap, Assert, fb(), FreeSnapshot(), pfree(), SnapshotData::regd_count, and SnapshotResetXmin().
Referenced by _SPI_execute_plan(), AfterTriggerFireDeferred(), AfterTriggerSetState(), ATExecDetachPartition(), BuildCachedPlan(), clear_subscription_skip_lsn(), cluster_multiple_rels(), DefineIndex(), detachPartitionTable(), DisableSubscriptionAndExit(), do_autovacuum(), DoPortalRewind(), end_replication_step(), EndCopyTo(), EventTriggerOnLogin(), exec_bind_message(), exec_eval_simple_expr(), exec_parse_message(), exec_simple_query(), ExecCreateTableAs(), execute_sql_string(), ExecuteCallStmt(), ExecWaitStmt(), ExplainOnePlan(), FindConflictTuple(), fmgr_sql(), ForgetPortalSnapshots(), HandleFunctionRequest(), index_drop(), initialize_worker_spi(), LogicalRepSyncTableStart(), movedb(), ParallelWorkerMain(), PersistHoldablePortal(), PortalRunMulti(), PortalRunSelect(), PortalRunUtility(), PortalStart(), PreCommit_on_commit_actions(), refresh_matview_datafill(), ReindexMultipleInternal(), ReindexRelationConcurrently(), RelationFindReplTupleByIndex(), RelationFindReplTupleSeq(), RemoveTempRelationsCallback(), RevalidateCachedQuery(), run_apply_worker(), ShutdownSQLFunction(), update_retention_status(), vacuum(), vacuum_rel(), and worker_spi_main().
Definition at line 682 of file snapmgr.c.
References GetCurrentTransactionNestLevel(), and PushActiveSnapshotWithLevel().
Referenced by _SPI_execute_plan(), AfterTriggerFireDeferred(), AfterTriggerSetState(), ATExecDetachPartition(), begin_replication_step(), BuildCachedPlan(), clear_subscription_skip_lsn(), cluster_multiple_rels(), DefineIndex(), detachPartitionTable(), DisableSubscriptionAndExit(), do_autovacuum(), DoPortalRewind(), EventTriggerOnLogin(), exec_bind_message(), exec_eval_simple_expr(), exec_parse_message(), exec_simple_query(), execute_sql_string(), ExecuteCallStmt(), FindConflictTuple(), fmgr_sql(), HandleFunctionRequest(), index_drop(), initialize_worker_spi(), LogicalRepSyncTableStart(), ParallelWorkerMain(), PersistHoldablePortal(), PortalRunSelect(), PortalStart(), PreCommit_on_commit_actions(), PushCopiedSnapshot(), ReindexMultipleInternal(), ReindexRelationConcurrently(), RelationFindReplTupleByIndex(), RelationFindReplTupleSeq(), RemoveTempRelationsCallback(), RevalidateCachedQuery(), run_apply_worker(), ShutdownSQLFunction(), update_retention_status(), vacuum(), vacuum_rel(), and worker_spi_main().
Definition at line 696 of file snapmgr.c.
References ActiveSnapshot, ActiveSnapshotElt::as_level, Assert, SnapshotData::copied, CopySnapshot(), CurrentSnapshot, fb(), InvalidSnapshot, MemoryContextAlloc(), SecondarySnapshot, and TopTransactionContext.
Referenced by EnsurePortalSnapshotExists(), PortalRunUtility(), and PushActiveSnapshot().
Definition at line 732 of file snapmgr.c.
References CopySnapshot(), and PushActiveSnapshot().
Referenced by _SPI_execute_plan(), BeginCopyTo(), ExecCreateTableAs(), ExplainOnePlan(), PortalRunMulti(), and refresh_matview_datafill().
Definition at line 824 of file snapmgr.c.
References CurrentResourceOwner, InvalidSnapshot, and RegisterSnapshotOnOwner().
Referenced by _brin_begin_parallel(), _bt_begin_parallel(), _gin_begin_parallel(), asyncQueueReadAllNotifications(), ATRewriteTable(), bt_check_every_level(), check_default_partition_contents(), CreateQueryDesc(), currtid_internal(), DefineIndex(), heapam_index_build_range_scan(), index_beginscan_parallel(), IndexCheckExclusion(), MergePartitionsMoveRows(), pg_get_constraintdef_worker(), PortalRunMulti(), PortalRunUtility(), process_settings(), ReindexRelationConcurrently(), ScanPgRelation(), ScanSourceDatabasePgClass(), SplitPartitionMoveRows(), standard_ExecutorStart(), systable_beginscan(), systable_beginscan_ordered(), systable_recheck_tuple(), table_beginscan_catalog(), table_beginscan_parallel(), table_beginscan_parallel_tidrange(), validateDomainCheckConstraint(), validateDomainNotNullConstraint(), and validateForeignKeyConstraint().
| Snapshot RegisterSnapshotOnOwner | ( | Snapshot | snapshot, |
| ResourceOwner | owner | ||
| ) |
Definition at line 837 of file snapmgr.c.
References SnapshotData::copied, CopySnapshot(), fb(), InvalidSnapshot, pairingheap_add(), RegisteredSnapshots, ResourceOwnerEnlarge(), and ResourceOwnerRememberSnapshot().
Referenced by be_lo_open(), and RegisterSnapshot().
|
inlinestatic |
Definition at line 240 of file snapmgr.c.
References fb(), PointerGetDatum(), ResourceOwnerForget(), and snapshot_resowner_desc.
Referenced by UnregisterSnapshotFromOwner().
|
inlinestatic |
Definition at line 235 of file snapmgr.c.
References fb(), PointerGetDatum(), ResourceOwnerRemember(), and snapshot_resowner_desc.
Referenced by RegisterSnapshotOnOwner().
Definition at line 1968 of file snapmgr.c.
References DatumGetPointer(), and UnregisterSnapshotNoOwner().
Definition at line 1793 of file snapmgr.c.
References SnapshotData::active_count, SnapshotData::copied, SnapshotData::curcid, fb(), MemoryContextAlloc(), SnapshotData::regd_count, SNAPSHOT_MVCC, SnapshotData::snapshot_type, SnapshotData::snapXactCompletionCount, SnapshotData::suboverflowed, SnapshotData::subxcnt, SnapshotData::subxip, SnapshotData::takenDuringRecovery, TopTransactionContext, SnapshotData::xcnt, SnapshotData::xip, SnapshotData::xmax, and SnapshotData::xmin.
Referenced by index_beginscan_parallel(), ParallelWorkerMain(), table_beginscan_parallel(), and table_beginscan_parallel_tidrange().
Definition at line 1853 of file snapmgr.c.
References fb(), InvalidPid, and SetTransactionSnapshot().
Referenced by CreateReplicationSlot(), and ParallelWorkerMain().
Definition at line 1736 of file snapmgr.c.
References Assert, SnapshotData::curcid, fb(), SnapshotData::suboverflowed, SnapshotData::subxcnt, SnapshotData::subxip, SnapshotData::takenDuringRecovery, SnapshotData::xcnt, SnapshotData::xip, SnapshotData::xmax, and SnapshotData::xmin.
Referenced by index_parallelscan_initialize(), InitializeParallelDSM(), and table_parallelscan_initialize().
|
static |
Definition at line 511 of file snapmgr.c.
References Assert, CopySnapshot(), CurrentSnapshot, CurrentSnapshotData, ereport, errcode(), errdetail(), errmsg(), ERROR, fb(), FirstSnapshotSet, FirstXactSnapshot, GetMaxSnapshotSubxidCount(), GetMaxSnapshotXidCount(), GetSnapshotData(), HistoricSnapshotActive(), InvalidateCatalogSnapshot(), IsolationIsSerializable, IsolationUsesXactSnapshot, pairingheap_add(), pairingheap_is_empty, SnapshotData::ph_node, ProcArrayInstallImportedXmin(), ProcArrayInstallRestoredXmin(), SnapshotData::regd_count, RegisteredSnapshots, SetSerializableTransactionSnapshot(), SnapshotData::snapXactCompletionCount, SnapshotData::suboverflowed, SnapshotData::subxcnt, SnapshotData::subxip, SnapshotData::takenDuringRecovery, SnapshotData::xcnt, SnapshotData::xip, SnapshotData::xmax, and SnapshotData::xmin.
Referenced by ImportSnapshot(), and RestoreTransactionSnapshot().
Definition at line 1669 of file snapmgr.c.
References Assert, fb(), HistoricSnapshot, and tuplecid_data.
Referenced by ReorderBufferProcessTXN(), and ReorderBufferQueueMessage().
Definition at line 937 of file snapmgr.c.
References ActiveSnapshot, fb(), InvalidTransactionId, MyProc, pairingheap_container, pairingheap_first(), pairingheap_is_empty, RegisteredSnapshots, TransactionIdPrecedes(), TransactionXmin, and PGPROC::xmin.
Referenced by AtEOXact_Snapshot(), AtSubAbort_Snapshot(), InvalidateCatalogSnapshot(), PopActiveSnapshot(), and UnregisterSnapshotNoOwner().
Definition at line 490 of file snapmgr.c.
References SnapshotData::curcid, CurrentSnapshot, FirstSnapshotSet, and SecondarySnapshot.
Referenced by CommandCounterIncrement().
Definition at line 1685 of file snapmgr.c.
References fb(), HistoricSnapshot, and tuplecid_data.
Referenced by ReorderBufferProcessTXN(), and ReorderBufferQueueMessage().
Definition at line 1626 of file snapmgr.c.
References pairingheap_is_empty, pairingheap_is_singular, and RegisteredSnapshots.
Referenced by CopyFrom().
Definition at line 866 of file snapmgr.c.
References CurrentResourceOwner, fb(), and UnregisterSnapshotFromOwner().
Referenced by _brin_begin_parallel(), _brin_end_parallel(), _bt_begin_parallel(), _bt_end_parallel(), _gin_begin_parallel(), _gin_end_parallel(), asyncQueueReadAllNotifications(), ATRewriteTable(), bt_check_every_level(), check_default_partition_contents(), currtid_internal(), DefineIndex(), FreeQueryDesc(), heap_endscan(), heapam_index_build_range_scan(), index_endscan(), IndexCheckExclusion(), MergePartitionsMoveRows(), pg_get_constraintdef_worker(), process_settings(), ReindexRelationConcurrently(), ScanPgRelation(), ScanSourceDatabasePgClass(), SplitPartitionMoveRows(), standard_ExecutorEnd(), systable_endscan(), systable_endscan_ordered(), systable_recheck_tuple(), validateDomainCheckConstraint(), validateDomainNotNullConstraint(), and validateForeignKeyConstraint().
| void UnregisterSnapshotFromOwner | ( | Snapshot | snapshot, |
| ResourceOwner | owner | ||
| ) |
Definition at line 879 of file snapmgr.c.
References fb(), ResourceOwnerForgetSnapshot(), and UnregisterSnapshotNoOwner().
Referenced by closeLOfd(), PortalDrop(), PreCommit_Portals(), and UnregisterSnapshot().
Definition at line 889 of file snapmgr.c.
References SnapshotData::active_count, Assert, FreeSnapshot(), pairingheap_is_empty, pairingheap_remove(), SnapshotData::ph_node, SnapshotData::regd_count, RegisteredSnapshots, and SnapshotResetXmin().
Referenced by ResOwnerReleaseSnapshot(), and UnregisterSnapshotFromOwner().
Definition at line 744 of file snapmgr.c.
References SnapshotData::active_count, ActiveSnapshot, ActiveSnapshotElt::as_snap, Assert, SnapshotData::curcid, elog, ERROR, fb(), GetCurrentCommandId(), IsInParallelMode(), and SnapshotData::regd_count.
Referenced by _SPI_execute_plan(), BeginCopyTo(), ExecCreateTableAs(), ExplainOnePlan(), fmgr_sql(), PortalRunMulti(), and refresh_matview_datafill().
Definition at line 1574 of file snapmgr.c.
References exportedSnapshots, and NIL.
Referenced by PrepareTransaction().
| bool XidInMVCCSnapshot | ( | TransactionId | xid, |
| Snapshot | snapshot | ||
| ) |
Definition at line 1869 of file snapmgr.c.
References pg_lfind32(), SnapshotData::suboverflowed, SubTransGetTopmostTransaction(), SnapshotData::subxcnt, SnapshotData::subxip, SnapshotData::takenDuringRecovery, TransactionIdFollowsOrEquals(), TransactionIdPrecedes(), SnapshotData::xcnt, SnapshotData::xip, SnapshotData::xmax, and SnapshotData::xmin.
Referenced by asyncQueueProcessPageEntries(), find_inheritance_children_extended(), HeapTupleSatisfiesMVCC(), and RelationGetPartitionDesc().
|
static |
Definition at line 910 of file snapmgr.c.
References a, b, fb(), pairingheap_const_container, TransactionIdFollows(), and TransactionIdPrecedes().
|
static |
Definition at line 181 of file snapmgr.c.
Referenced by ActiveSnapshotSet(), AtEOXact_Snapshot(), AtSubAbort_Snapshot(), AtSubCommit_Snapshot(), GetActiveSnapshot(), HaveRegisteredOrActiveSnapshot(), InvalidateCatalogSnapshotConditionally(), PopActiveSnapshot(), PushActiveSnapshotWithLevel(), SnapshotResetXmin(), and UpdateActiveSnapshotCommandId().
Definition at line 151 of file snapmgr.c.
Referenced by GetNonHistoricCatalogSnapshot(), HaveRegisteredOrActiveSnapshot(), InvalidateCatalogSnapshot(), and InvalidateCatalogSnapshotConditionally().
|
static |
Definition at line 143 of file snapmgr.c.
Referenced by GetNonHistoricCatalogSnapshot().
Definition at line 149 of file snapmgr.c.
Referenced by AtEOXact_Snapshot(), GetTransactionSnapshot(), PushActiveSnapshotWithLevel(), SetTransactionSnapshot(), and SnapshotSetCommandId().
|
static |
Definition at line 141 of file snapmgr.c.
Referenced by GetTransactionSnapshot(), and SetTransactionSnapshot().
Definition at line 213 of file snapmgr.c.
Referenced by AtEOXact_Snapshot(), ExportSnapshot(), and XactHasExportedSnapshots().
Definition at line 193 of file snapmgr.c.
Referenced by AtEOXact_Snapshot(), check_transaction_deferrable(), check_transaction_isolation(), check_transaction_read_only(), CreateReplicationSlot(), GetLatestSnapshot(), GetTransactionSnapshot(), ImportSnapshot(), SetTransactionSnapshot(), and SnapshotSetCommandId().
Definition at line 200 of file snapmgr.c.
Referenced by AtEOXact_Snapshot(), GetTransactionSnapshot(), and SetTransactionSnapshot().
Definition at line 152 of file snapmgr.c.
Referenced by GetCatalogSnapshot(), GetTransactionSnapshot(), HistoricSnapshotActive(), SetupHistoricSnapshot(), and TeardownHistoricSnapshot().
| TransactionId RecentXmin = FirstNormalTransactionId |
Definition at line 160 of file snapmgr.c.
Referenced by ATRewriteTables(), bt_check_every_level(), GetSnapshotData(), GetSnapshotDataReuse(), GlobalVisTestFor(), GlobalVisTestShouldUpdate(), GlobalVisUpdateApply(), heap_hot_search_buffer(), heapam_relation_set_new_filelocator(), index_getnext_tid(), refresh_by_heap_swap(), and TransactionIdIsInProgress().
|
static |
Definition at line 190 of file snapmgr.c.
Referenced by AtEOXact_Snapshot(), ExportSnapshot(), GetNonHistoricCatalogSnapshot(), GetTransactionSnapshot(), HaveRegisteredOrActiveSnapshot(), InvalidateCatalogSnapshot(), InvalidateCatalogSnapshotConditionally(), RegisterSnapshotOnOwner(), SetTransactionSnapshot(), SnapshotResetXmin(), ThereAreNoPriorRegisteredSnapshots(), and UnregisterSnapshotNoOwner().
Definition at line 150 of file snapmgr.c.
Referenced by AtEOXact_Snapshot(), GetLatestSnapshot(), PushActiveSnapshotWithLevel(), and SnapshotSetCommandId().
|
static |
|
static |
Definition at line 224 of file snapmgr.c.
Referenced by ResourceOwnerForgetSnapshot(), and ResourceOwnerRememberSnapshot().
| SnapshotData SnapshotAnyData = {SNAPSHOT_ANY} |
Definition at line 145 of file snapmgr.c.
| SnapshotData SnapshotSelfData = {SNAPSHOT_SELF} |
Definition at line 144 of file snapmgr.c.
| SnapshotData SnapshotToastData = {SNAPSHOT_TOAST} |
| TransactionId TransactionXmin = FirstNormalTransactionId |
Definition at line 159 of file snapmgr.c.
Referenced by BuildCachedPlan(), CheckCachedPlan(), get_relation_info(), GetSnapshotData(), GetSnapshotDataReuse(), heap_abort_speculative(), HeapCheckForSerializableConflictOut(), ProcArrayInstallImportedXmin(), ProcArrayInstallRestoredXmin(), SnapshotResetXmin(), SubTransGetParent(), SubTransGetTopmostTransaction(), TransactionIdDidAbort(), and TransactionIdDidCommit().
Definition at line 163 of file snapmgr.c.
Referenced by ApplyLogicalMappingFile(), HistoricSnapshotGetTupleCids(), ResolveCminCmaxDuringDecoding(), SetupHistoricSnapshot(), TeardownHistoricSnapshot(), and UpdateLogicalMappings().