PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/clog.h"
#include "access/subtrans.h"
#include "access/transam.h"
#include "utils/snapmgr.h"
Go to the source code of this file.
Functions | |
static XidStatus | TransactionLogFetch (TransactionId transactionId) |
bool | TransactionIdDidCommit (TransactionId transactionId) |
bool | TransactionIdDidAbort (TransactionId transactionId) |
void | TransactionIdCommitTree (TransactionId xid, int nxids, TransactionId *xids) |
void | TransactionIdAsyncCommitTree (TransactionId xid, int nxids, TransactionId *xids, XLogRecPtr lsn) |
void | TransactionIdAbortTree (TransactionId xid, int nxids, TransactionId *xids) |
bool | TransactionIdPrecedes (TransactionId id1, TransactionId id2) |
bool | TransactionIdPrecedesOrEquals (TransactionId id1, TransactionId id2) |
bool | TransactionIdFollows (TransactionId id1, TransactionId id2) |
bool | TransactionIdFollowsOrEquals (TransactionId id1, TransactionId id2) |
TransactionId | TransactionIdLatest (TransactionId mainxid, int nxids, const TransactionId *xids) |
XLogRecPtr | TransactionIdGetCommitLSN (TransactionId xid) |
Variables | |
static TransactionId | cachedFetchXid = InvalidTransactionId |
static XidStatus | cachedFetchXidStatus |
static XLogRecPtr | cachedCommitLSN |
void TransactionIdAbortTree | ( | TransactionId | xid, |
int | nxids, | ||
TransactionId * | xids | ||
) |
Definition at line 270 of file transam.c.
References InvalidXLogRecPtr, TRANSACTION_STATUS_ABORTED, and TransactionIdSetTreeStatus().
Referenced by RecordTransactionAbort(), RecordTransactionAbortPrepared(), and xact_redo_abort().
void TransactionIdAsyncCommitTree | ( | TransactionId | xid, |
int | nxids, | ||
TransactionId * | xids, | ||
XLogRecPtr | lsn | ||
) |
Definition at line 252 of file transam.c.
References TRANSACTION_STATUS_COMMITTED, and TransactionIdSetTreeStatus().
Referenced by RecordTransactionCommit(), and xact_redo_commit().
void TransactionIdCommitTree | ( | TransactionId | xid, |
int | nxids, | ||
TransactionId * | xids | ||
) |
Definition at line 240 of file transam.c.
References InvalidXLogRecPtr, TRANSACTION_STATUS_COMMITTED, and TransactionIdSetTreeStatus().
Referenced by RecordTransactionCommit(), RecordTransactionCommitPrepared(), and xact_redo_commit().
bool TransactionIdDidAbort | ( | TransactionId | transactionId | ) |
Definition at line 188 of file transam.c.
References elog, SubTransGetParent(), TRANSACTION_STATUS_ABORTED, TRANSACTION_STATUS_SUB_COMMITTED, TransactionIdIsValid, TransactionIdPrecedes(), TransactionLogFetch(), TransactionXmin, and WARNING.
Referenced by DoesMultiXactIdConflict(), heap_lock_updated_tuple_rec(), heap_update(), ProcArrayApplyRecoveryInfo(), ProcessTwoPhaseBuffer(), StandbyAcquireAccessExclusiveLock(), test_lockmode_for_conflict(), and TransactionIdIsInProgress().
bool TransactionIdDidCommit | ( | TransactionId | transactionId | ) |
Definition at line 126 of file transam.c.
References elog, SubTransGetParent(), TRANSACTION_STATUS_COMMITTED, TRANSACTION_STATUS_SUB_COMMITTED, TransactionIdIsValid, TransactionIdPrecedes(), TransactionLogFetch(), TransactionXmin, and WARNING.
Referenced by asyncQueueProcessPageEntries(), check_safe_enum_use(), compute_new_xmax_infomask(), FreezeMultiXactId(), HandleConcurrentAbort(), heap_pre_freeze_checks(), HeapTupleHeaderAdvanceConflictHorizon(), HeapTupleHeaderIsOnlyLocked(), HeapTupleSatisfiesDirty(), HeapTupleSatisfiesHistoricMVCC(), HeapTupleSatisfiesMVCC(), HeapTupleSatisfiesSelf(), HeapTupleSatisfiesToast(), HeapTupleSatisfiesUpdate(), HeapTupleSatisfiesVacuumHorizon(), MultiXactIdExpand(), pg_xact_status(), ProcArrayApplyRecoveryInfo(), ProcessTwoPhaseBuffer(), RecordTransactionAbort(), RecordTransactionAbortPrepared(), SetupCheckXidLive(), StandbyAcquireAccessExclusiveLock(), test_lockmode_for_conflict(), UpdateLogicalMappings(), and UpdateXmaxHintBits().
bool TransactionIdFollows | ( | TransactionId | id1, |
TransactionId | id2 | ||
) |
Definition at line 314 of file transam.c.
References TransactionIdIsNormal.
Referenced by find_inheritance_children_extended(), GetConflictingVirtualXIDs(), GetSerializableTransactionSnapshotInt(), heap_page_is_all_visible(), heap_page_prune_and_freeze(), heap_prune_record_unchanged_lp_normal(), HeapTupleHeaderAdvanceConflictHorizon(), predicatelock_twophase_recover(), ProcessTwoPhaseBuffer(), RecordKnownAssignedTransactionIds(), SerialAdd(), SerialGetMinConflictCommitSeqNo(), SerialSetActiveSerXmin(), SnapBuildInitialSnapshot(), SnapBuildWaitSnapshot(), SubTransSetParent(), update_local_synced_slot(), and xmin_cmp().
bool TransactionIdFollowsOrEquals | ( | TransactionId | id1, |
TransactionId | id2 | ||
) |
Definition at line 329 of file transam.c.
References TransactionIdIsNormal.
Referenced by AdvanceNextFullTransactionIdPastXid(), ForceTransactionIdLimitUpdate(), GetNewTransactionId(), HeapCheckForSerializableConflictOut(), HeapTupleSatisfiesHistoricMVCC(), KnownAssignedXidsAdd(), KnownAssignedXidsGetAndSetXmin(), KnownAssignedXidsRemovePreceding(), ProcessTwoPhaseBuffer(), SetTransactionIdLimit(), SnapBuildCommitTxn(), SnapBuildPurgeOlderTxn(), SubTransGetParent(), SubTransGetTopmostTransaction(), vacuumLeafPage(), XidInMVCCSnapshot(), and XidIsConcurrent().
XLogRecPtr TransactionIdGetCommitLSN | ( | TransactionId | xid | ) |
Definition at line 382 of file transam.c.
References cachedCommitLSN, cachedFetchXid, InvalidXLogRecPtr, TransactionIdEquals, TransactionIdGetStatus(), and TransactionIdIsNormal.
Referenced by SetHintBits().
TransactionId TransactionIdLatest | ( | TransactionId | mainxid, |
int | nxids, | ||
const TransactionId * | xids | ||
) |
Definition at line 345 of file transam.c.
References TransactionIdPrecedes().
Referenced by FinishPreparedTransaction(), ProcArrayApplyXidAssignment(), RecordTransactionAbort(), RecordTransactionCommit(), xact_redo_abort(), and xact_redo_commit().
bool TransactionIdPrecedes | ( | TransactionId | id1, |
TransactionId | id2 | ||
) |
Definition at line 280 of file transam.c.
References TransactionIdIsNormal.
Referenced by AdvanceOldestClogXid(), AdvanceOldestCommitTsXid(), bt_check_every_level(), check_exclusion_or_unique_constraint(), check_tuple_visibility(), CheckTargetForConflictsIn(), CLOGPagePrecedes(), collect_corrupt_items(), CommitTsPagePrecedes(), copy_table_data(), do_start_worker(), ExpireOldKnownAssignedTransactionIds(), ExportSnapshot(), FreezeMultiXactId(), get_relation_info(), GetOldestActiveTransactionId(), GetOldestSafeDecodingTransactionId(), GetRunningTransactionData(), heap_abort_speculative(), heap_page_is_all_visible(), heap_prepare_freeze_tuple(), heap_prune_record_prunable(), heap_prune_record_unchanged_lp_normal(), heap_tuple_should_freeze(), HeapCheckForSerializableConflictOut(), HeapTupleHeaderAdvanceConflictHorizon(), HeapTupleSatisfiesHistoricMVCC(), HeapTupleSatisfiesVacuum(), KnownAssignedXidsAdd(), KnownAssignedXidsGetAndSetXmin(), KnownAssignedXidsSearch(), logical_rewrite_heap_tuple(), MaintainLatestCompletedXid(), MaintainLatestCompletedXidRecovery(), multixact_redo(), PhysicalReplicationSlotNewXmin(), PrescanPreparedTransactions(), ProcArrayApplyRecoveryInfo(), ProcArrayApplyXidAssignment(), ProcessStandbyHSFeedbackMessage(), RecordKnownAssignedTransactionIds(), relation_needs_vacanalyze(), ReorderBufferAbortOld(), ReplicationSlotsComputeRequiredXmin(), rewrite_heap_tuple(), SerialGetMinConflictCommitSeqNo(), SerialPagePrecedesLogically(), SerialSetActiveSerXmin(), SetCommitTsLimit(), SetNewSxactGlobalXmin(), SnapBuildCommitTxn(), SnapBuildProcessChange(), SnapBuildRestore(), SnapshotResetXmin(), StandbyReleaseOldLocks(), SubTransGetTopmostTransaction(), SubTransPagePrecedes(), TransactionIdDidAbort(), TransactionIdDidCommit(), TransactionIdGetCommitTsData(), TransactionIdIsActive(), TransactionIdIsCurrentTransactionId(), TransactionIdIsInProgress(), TransactionIdLatest(), TransactionIdOlder(), TransactionTreeSetCommitTsData(), tuple_all_visible(), update_local_synced_slot(), vac_truncate_clog(), vac_update_datfrozenxid(), vac_update_relstats(), vacuum_get_cutoffs(), vacuum_xid_failsafe_check(), vacuumRedirectAndPlaceholder(), XidInMVCCSnapshot(), XidIsConcurrent(), xidLogicalComparator(), xlog_redo(), and xmin_cmp().
bool TransactionIdPrecedesOrEquals | ( | TransactionId | id1, |
TransactionId | id2 | ||
) |
Definition at line 299 of file transam.c.
References TransactionIdIsNormal.
Referenced by ClearOldPredicateLocks(), ComputeXidHorizons(), GetCurrentVirtualXIDs(), GetSnapshotData(), GetSnapshotDataReuse(), heap_prepare_freeze_tuple(), heap_tuple_should_freeze(), heap_vacuum_rel(), InvalidatePossiblyObsoleteSlot(), KnownAssignedXidsAdd(), LogicalIncreaseXminForSlot(), ProcArrayInstallImportedXmin(), ProcArrayInstallRestoredXmin(), SnapBuildFindSnapshot(), TransactionIdInRecentPast(), TransactionIdIsInProgress(), and vacuum_get_cutoffs().
|
static |
Definition at line 52 of file transam.c.
References BootstrapTransactionId, cachedCommitLSN, cachedFetchXid, cachedFetchXidStatus, FrozenTransactionId, TRANSACTION_STATUS_ABORTED, TRANSACTION_STATUS_COMMITTED, TRANSACTION_STATUS_IN_PROGRESS, TRANSACTION_STATUS_SUB_COMMITTED, TransactionIdEquals, TransactionIdGetStatus(), and TransactionIdIsNormal.
Referenced by TransactionIdDidAbort(), and TransactionIdDidCommit().
|
static |
Definition at line 35 of file transam.c.
Referenced by TransactionIdGetCommitLSN(), and TransactionLogFetch().
|
static |
Definition at line 33 of file transam.c.
Referenced by TransactionIdGetCommitLSN(), and TransactionLogFetch().
|
static |
Definition at line 34 of file transam.c.
Referenced by TransactionLogFetch().