|
PostgreSQL Source Code git master
|
#include "access/xlogdefs.h"

Go to the source code of this file.
Data Structures | |
| struct | FullTransactionId |
| struct | TransamVariablesData |
Typedefs | |
| typedef struct FullTransactionId | FullTransactionId |
| typedef struct TransamVariablesData | TransamVariablesData |
Variables | |
| PGDLLIMPORT TransamVariablesData * | TransamVariables |
| #define BootstrapTransactionId ((TransactionId) 1) |
| #define FirstNormalFullTransactionId FullTransactionIdFromEpochAndXid(0, FirstNormalTransactionId) |
| #define FirstNormalTransactionId ((TransactionId) 3) |
| #define FrozenTransactionId ((TransactionId) 2) |
| #define FullTransactionIdIsNormal | ( | x | ) | FullTransactionIdFollowsOrEquals(x, FirstNormalFullTransactionId) |
| #define FullTransactionIdIsValid | ( | x | ) | TransactionIdIsValid(XidFromFullTransactionId(x)) |
| #define InvalidFullTransactionId FullTransactionIdFromEpochAndXid(0, InvalidTransactionId) |
| #define InvalidTransactionId ((TransactionId) 0) |
| #define MaxTransactionId ((TransactionId) 0xFFFFFFFF) |
Definition at line 152 of file transam.h.
| #define StoreInvalidTransactionId | ( | dest | ) | (*(dest) = InvalidTransactionId) |
| #define TransactionIdAdvance | ( | dest | ) |
Definition at line 91 of file transam.h.
| #define TransactionIdIsNormal | ( | xid | ) | ((xid) >= FirstNormalTransactionId) |
| #define TransactionIdIsValid | ( | xid | ) | ((xid) != InvalidTransactionId) |
| #define TransactionIdRetreat | ( | dest | ) |
|
extern |
Definition at line 304 of file varsup.c.
References AmStartupProcess, Assert, epoch, EpochFromFullTransactionId, fb(), FullTransactionIdFromEpochAndXid(), IsUnderPostmaster, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), TransamVariablesData::nextXid, TransactionIdAdvance, TransactionIdFollowsOrEquals(), TransamVariables, unlikely, and XidFromFullTransactionId.
Referenced by ApplyWalRecord(), multixact_redo(), ProcArrayApplyRecoveryInfo(), ProcessTwoPhaseBuffer(), RecordKnownAssignedTransactionIds(), xact_redo_abort(), and xact_redo_commit().
|
extern |
Definition at line 355 of file varsup.c.
References fb(), LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), TransamVariablesData::oldestClogXid, TransactionIdPrecedes(), and TransamVariables.
Referenced by BootStrapXLOG(), clog_redo(), StartupXLOG(), and TruncateCLOG().
Definition at line 517 of file varsup.c.
References fb(), LW_SHARED, LWLockAcquire(), LWLockRelease(), TransamVariablesData::nextXid, ObjectIdGetDatum(), TransamVariablesData::oldestXid, TransamVariablesData::oldestXidDB, SearchSysCacheExists1, TransactionIdFollowsOrEquals(), TransactionIdIsNormal, TransactionIdIsValid, TransamVariables, XidFromFullTransactionId, and TransamVariablesData::xidVacLimit.
Referenced by vac_update_datfrozenxid().
|
inlinestatic |
Definition at line 128 of file transam.h.
References FirstNormalFullTransactionId, FirstNormalTransactionId, FullTransactionIdPrecedes, and XidFromFullTransactionId.
Referenced by GetNewTransactionId(), and GetSnapshotData().
|
inlinestatic |
Definition at line 443 of file transam.h.
References Assert, epoch, EpochFromFullTransactionId, fb(), FullTransactionIdFromEpochAndXid(), TransactionIdIsNormal, TransactionIdPrecedesOrEquals(), unlikely, and XidFromFullTransactionId.
Referenced by AdjustToFullTransactionId(), pg_current_snapshot(), PrepareRedoAdd(), PrepareRedoRemove(), ProcessStandbyPSRequestMessage(), removable_cutoff(), TransactionIdInRecentPast(), and XLogRecGetFullXid().
|
inlinestatic |
Definition at line 71 of file transam.h.
References epoch, and FullTransactionId::value.
Referenced by AdvanceNextFullTransactionIdPastXid(), BootStrapXLOG(), FullTransactionIdFromAllowableAt(), FullTransactionIdFromXidAndCtx(), GetNewTransactionId(), GistPageGetDeleteXid(), GuessControlValues(), and main().
|
inlinestatic |
Definition at line 81 of file transam.h.
References FullTransactionId::value, and value.
Referenced by DatumGetFullTransactionId(), FullTransactionIdFromXidAndCtx(), FullXidRelativeTo(), LogicalRepApplyLoop(), parse_snapshot(), pg_snapshot_recv(), restoreTwoPhaseData(), xid8in(), and xid8recv().
|
inlinestatic |
Definition at line 422 of file transam.h.
References a, b, FullTransactionIdFollows, and FullTransactionIdIsValid.
Referenced by GetSnapshotData(), and GlobalVisUpdateApply().
|
inlinestatic |
Definition at line 103 of file transam.h.
References FirstNormalFullTransactionId, FirstNormalTransactionId, FullTransactionIdPrecedes, and XidFromFullTransactionId.
Referenced by ExpireAllKnownAssignedTransactionIds(), and StartupXLOG().
Definition at line 555 of file varsup.c.
References elog, ERROR, fb(), FirstGenbkiObjectId, FirstNormalObjectId, IsPostmasterEnvironment, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), TransamVariablesData::nextOid, TransamVariablesData::oidCount, RecoveryInProgress(), TransamVariables, VAR_OID_PREFETCH, and XLogPutNextOid().
Referenced by GetNewOidWithIndex(), and GetNewRelFileNumber().
|
extern |
Definition at line 77 of file varsup.c.
References Assert, BootstrapTransactionId, XidCacheStatus::count, elog, ereport, errcode(), errhint(), errmsg(), ERROR, ExtendCLOG(), ExtendCommitTs(), ExtendSUBTRANS(), fb(), FullTransactionIdAdvance(), FullTransactionIdFromEpochAndXid(), get_database_name(), IsBootstrapProcessingMode, IsInParallelMode(), IsUnderPostmaster, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), MyProc, TransamVariablesData::nextXid, TransamVariablesData::oldestXidDB, XidCacheStatus::overflowed, pg_write_barrier, PGPROC_MAX_CACHED_SUBXIDS, PGPROC::pgxactoff, PMSIGNAL_START_AUTOVAC_LAUNCHER, ProcGlobal, RecoveryInProgress(), SendPostmasterSignal(), PGPROC::subxids, PROC_HDR::subxidStates, PGPROC::subxidStatus, TransactionIdFollowsOrEquals(), TransamVariables, WARNING, PGPROC::xid, XidFromFullTransactionId, XidCache::xids, PROC_HDR::xids, TransamVariablesData::xidStopLimit, TransamVariablesData::xidVacLimit, TransamVariablesData::xidWarnLimit, and TransamVariablesData::xidWrapLimit.
Referenced by AssignTransactionId(), and consume_xids_common().
|
inlinestatic |
Definition at line 411 of file transam.h.
References a, Assert, b, NormalTransactionIdPrecedes, and TransactionIdIsNormal.
|
extern |
Definition at line 288 of file varsup.c.
References fb(), LW_SHARED, LWLockAcquire(), LWLockRelease(), TransamVariablesData::nextXid, and TransamVariables.
Referenced by _bt_unlink_halfdead_page(), AdjustToFullTransactionId(), consume_xids(), consume_xids_common(), gistdeletepage(), pg_current_snapshot(), ProcessStandbyPSRequestMessage(), ReadNextTransactionId(), removable_cutoff(), ResolveRecoveryConflictWithSnapshotFullXid(), TransactionIdInRecentPast(), TransactionIdInRecentPast(), and XLogWalRcvSendHSFeedback().
|
inlinestatic |
Definition at line 377 of file transam.h.
References ReadNextFullTransactionId(), and XidFromFullTransactionId.
Referenced by ActivateCommitTs(), AutoVacWorkerMain(), do_start_worker(), GetStableLatestTransactionId(), ginDeletePage(), heap_vacuum_rel(), vac_truncate_clog(), vac_update_datfrozenxid(), vac_update_relstats(), vacuum_get_cutoffs(), and vacuum_xid_failsafe_check().
|
extern |
Definition at line 372 of file varsup.c.
References Assert, autovacuum_freeze_max_age, DEBUG1, ereport, errhint(), errmsg(), errmsg_internal(), fb(), FirstNormalTransactionId, get_database_name(), InRecovery, IsTransactionState(), IsUnderPostmaster, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), MaxTransactionId, TransamVariablesData::nextXid, TransamVariablesData::oldestXid, TransamVariablesData::oldestXidDB, PMSIGNAL_START_AUTOVAC_LAUNCHER, SendPostmasterSignal(), TransactionIdFollowsOrEquals(), TransactionIdIsNormal, TransamVariables, WARNING, XidFromFullTransactionId, TransamVariablesData::xidStopLimit, TransamVariablesData::xidVacLimit, TransamVariablesData::xidWarnLimit, and TransamVariablesData::xidWrapLimit.
Referenced by BootStrapXLOG(), StartupXLOG(), vac_truncate_clog(), and xlog_redo().
Definition at line 652 of file varsup.c.
References FirstUnpinnedObjectId, and SetNextObjectId().
Referenced by pg_stop_making_pinned_objects().
|
extern |
Definition at line 270 of file transam.c.
References fb(), InvalidXLogRecPtr, TRANSACTION_STATUS_ABORTED, and TransactionIdSetTreeStatus().
Referenced by RecordTransactionAbort(), RecordTransactionAbortPrepared(), and xact_redo_abort().
|
extern |
Definition at line 252 of file transam.c.
References fb(), TRANSACTION_STATUS_COMMITTED, and TransactionIdSetTreeStatus().
Referenced by RecordTransactionCommit(), and xact_redo_commit().
|
extern |
Definition at line 240 of file transam.c.
References fb(), InvalidXLogRecPtr, TRANSACTION_STATUS_COMMITTED, and TransactionIdSetTreeStatus().
Referenced by RecordTransactionCommit(), RecordTransactionCommitPrepared(), and xact_redo_commit().
|
extern |
Definition at line 188 of file transam.c.
References elog, fb(), SubTransGetParent(), TRANSACTION_STATUS_ABORTED, TRANSACTION_STATUS_SUB_COMMITTED, TransactionIdDidAbort(), TransactionIdIsValid, TransactionIdPrecedes(), TransactionLogFetch(), TransactionXmin, and WARNING.
Referenced by DoesMultiXactIdConflict(), heap_lock_updated_tuple_rec(), heap_update(), ProcArrayApplyRecoveryInfo(), ProcessTwoPhaseBuffer(), StandbyAcquireAccessExclusiveLock(), test_lockmode_for_conflict(), TransactionIdDidAbort(), and TransactionIdIsInProgress().
|
extern |
Definition at line 126 of file transam.c.
References elog, fb(), SubTransGetParent(), TRANSACTION_STATUS_COMMITTED, TRANSACTION_STATUS_SUB_COMMITTED, TransactionIdDidCommit(), TransactionIdIsValid, TransactionIdPrecedes(), TransactionLogFetch(), TransactionXmin, and WARNING.
Referenced by AsyncNotifyFreezeXids(), asyncQueueProcessPageEntries(), check_safe_enum_use(), compute_new_xmax_infomask(), FreezeMultiXactId(), get_xid_status(), HandleConcurrentAbort(), heap_pre_freeze_checks(), HeapTupleCleanMoved(), HeapTupleHeaderAdvanceConflictHorizon(), HeapTupleHeaderIsOnlyLocked(), HeapTupleSatisfiesDirty(), HeapTupleSatisfiesHistoricMVCC(), HeapTupleSatisfiesMVCC(), HeapTupleSatisfiesSelf(), HeapTupleSatisfiesUpdate(), HeapTupleSatisfiesVacuumHorizon(), MultiXactIdExpand(), pg_xact_status(), ProcArrayApplyRecoveryInfo(), ProcessTwoPhaseBuffer(), RecordTransactionAbort(), RecordTransactionAbortPrepared(), ReorderBufferCheckAndTruncateAbortedTXN(), SetupCheckXidLive(), StandbyAcquireAccessExclusiveLock(), test_lockmode_for_conflict(), TransactionIdDidCommit(), UpdateLogicalMappings(), and UpdateXmaxHintBits().
|
inlinestatic |
Definition at line 297 of file transam.h.
References fb(), and TransactionIdIsNormal.
Referenced by find_inheritance_children_extended(), GetConflictingVirtualXIDs(), GetSerializableTransactionSnapshotInt(), heap_page_prune_and_freeze(), heap_page_would_be_all_visible(), 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().
|
inlinestatic |
Definition at line 312 of file transam.h.
References fb(), and TransactionIdIsNormal.
Referenced by AdvanceNextFullTransactionIdPastXid(), ForceTransactionIdLimitUpdate(), GetNewTransactionId(), HeapCheckForSerializableConflictOut(), HeapTupleSatisfiesHistoricMVCC(), KnownAssignedXidsAdd(), KnownAssignedXidsGetAndSetXmin(), KnownAssignedXidsRemovePreceding(), SetTransactionIdLimit(), SnapBuildCommitTxn(), SnapBuildPurgeOlderTxn(), SubTransGetParent(), SubTransGetTopmostTransaction(), vacuumLeafPage(), XidInMVCCSnapshot(), and XidIsConcurrent().
|
extern |
Definition at line 318 of file transam.c.
References cachedCommitLSN, cachedFetchXid, fb(), InvalidXLogRecPtr, TransactionIdEquals, TransactionIdGetStatus(), and TransactionIdIsNormal.
Referenced by SetHintBits().
|
extern |
Definition at line 281 of file transam.c.
References fb(), and TransactionIdPrecedes().
Referenced by FinishPreparedTransaction(), ProcArrayApplyXidAssignment(), RecordTransactionAbort(), RecordTransactionCommit(), xact_redo_abort(), and xact_redo_commit().
|
inlinestatic |
Definition at line 396 of file transam.h.
References a, b, TransactionIdIsValid, and TransactionIdPrecedes().
Referenced by ComputeXidHorizons(), and GetSnapshotData().
|
inlinestatic |
Definition at line 263 of file transam.h.
References fb(), and TransactionIdIsNormal.
Referenced by AdvanceOldestClogXid(), AdvanceOldestCommitTsXid(), AsyncNotifyFreezeXids(), bt_check_every_level(), check_exclusion_or_unique_constraint(), check_tuple_visibility(), CheckTargetForConflictsIn(), CLOGPagePrecedes(), collect_corrupt_items(), CommitTsPagePrecedes(), compute_min_nonremovable_xid(), copy_table_data(), do_start_worker(), ExpireOldKnownAssignedTransactionIds(), ExportSnapshot(), FreezeMultiXactId(), get_relation_info(), GetOldestActiveTransactionId(), GetOldestSafeDecodingTransactionId(), GetRunningTransactionData(), heap_abort_speculative(), heap_page_would_be_all_visible(), heap_prepare_freeze_tuple(), heap_prune_record_prunable(), heap_prune_record_unchanged_lp_normal(), heap_tuple_should_freeze(), heap_vacuum_eager_scan_setup(), HeapCheckForSerializableConflictOut(), HeapTupleHeaderAdvanceConflictHorizon(), HeapTupleSatisfiesHistoricMVCC(), HeapTupleSatisfiesVacuum(), IsIndexUsableForFindingDeletedTuple(), KnownAssignedXidsAdd(), KnownAssignedXidsGetAndSetXmin(), KnownAssignedXidsSearch(), logical_rewrite_heap_tuple(), MaintainLatestCompletedXid(), MaintainLatestCompletedXidRecovery(), multixact_redo(), PhysicalReplicationSlotNewXmin(), PrescanPreparedTransactions(), ProcArrayApplyRecoveryInfo(), ProcArrayApplyXidAssignment(), ProcessStandbyHSFeedbackMessage(), ProcessStandbyPSRequestMessage(), RecordKnownAssignedTransactionIds(), relation_needs_vacanalyze(), ReorderBufferAbortOld(), ReplicationSlotsComputeRequiredXmin(), rewrite_heap_tuple(), SerialAdd(), SerialGetMinConflictCommitSeqNo(), SerialPagePrecedesLogically(), SerialSetActiveSerXmin(), SetCommitTsLimit(), SetNewSxactGlobalXmin(), SnapBuildCommitTxn(), SnapBuildProcessChange(), SnapBuildRestore(), SnapshotResetXmin(), StandbyReleaseOldLocks(), SubTransGetTopmostTransaction(), SubTransPagePrecedes(), TransactionIdDidAbort(), TransactionIdDidCommit(), TransactionIdGetCommitTsData(), TransactionIdIsCurrentTransactionId(), TransactionIdIsInProgress(), TransactionIdLatest(), TransactionIdOlder(), TransactionTreeSetCommitTsData(), tuple_all_visible(), TwoPhaseGetOldestXidInCommit(), 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().
|
inlinestatic |
Definition at line 282 of file transam.h.
References fb(), and TransactionIdIsNormal.
Referenced by ClearOldPredicateLocks(), ComputeXidHorizons(), DetermineSlotInvalidationCause(), FullTransactionIdFromAllowableAt(), get_candidate_xid(), GetCurrentVirtualXIDs(), GetSnapshotData(), GetSnapshotDataReuse(), heap_prepare_freeze_tuple(), heap_tuple_should_freeze(), heap_vacuum_rel(), KnownAssignedXidsAdd(), LogicalIncreaseXminForSlot(), ProcArrayInstallImportedXmin(), ProcArrayInstallRestoredXmin(), SnapBuildFindSnapshot(), TransactionIdInRecentPast(), TransactionIdIsInProgress(), update_conflict_slot_xmin(), and vacuum_get_cutoffs().
|
inlinestatic |
Definition at line 384 of file transam.h.
References fb(), and FirstNormalTransactionId.
Definition at line 1043 of file xact.c.
References CurrentTransactionState, and TransactionStateData::startedInRecovery.
Referenced by RelationGetIndexScan().
Definition at line 47 of file varsup.c.
References Assert, fb(), IsUnderPostmaster, ShmemInitStruct(), and TransamVariables.
Referenced by CreateOrAttachShmemStructs().
Definition at line 41 of file varsup.c.
Referenced by CalculateShmemSize().
|
extern |
Definition at line 34 of file varsup.c.
Referenced by ActivateCommitTs(), AdvanceNextFullTransactionIdPastXid(), AdvanceOldestClogXid(), AdvanceOldestCommitTsXid(), BootStrapXLOG(), ComputeXidHorizons(), consume_xids_shortcut(), CreateCheckPoint(), DeactivateCommitTs(), ExpireAllKnownAssignedTransactionIds(), ExpireOldKnownAssignedTransactionIds(), ExpireTreeKnownAssignedTransactionIds(), ForceTransactionIdLimitUpdate(), get_xid_status(), GetNewObjectId(), GetNewTransactionId(), GetOldestActiveTransactionId(), GetOldestSafeDecodingTransactionId(), GetRunningTransactionData(), GetSnapshotData(), GetSnapshotDataReuse(), GetStrictOldestNonRemovableTransactionId(), MaintainLatestCompletedXid(), MaintainLatestCompletedXidRecovery(), PrepareRedoAdd(), PrepareRedoRemove(), PrescanPreparedTransactions(), ProcArrayApplyRecoveryInfo(), ProcArrayClearTransaction(), ProcArrayEndTransactionInternal(), ProcArrayRemove(), ProcArrayShmemInit(), ProcessTwoPhaseBuffer(), ReadNextFullTransactionId(), ReleasePredicateLocks(), SetCommitTsLimit(), SetNextObjectId(), SetTransactionIdLimit(), StartupCLOG(), StartupSUBTRANS(), StartupXLOG(), TransactionIdGetCommitTsData(), TransactionIdInRecentPast(), TransactionIdIsInProgress(), TransactionTreeSetCommitTsData(), TrimCLOG(), update_cached_xid_range(), VarsupShmemInit(), XidCacheRemoveRunningXids(), xlog_redo(), and XLogRecGetFullXid().