PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <time.h>
#include <unistd.h>
#include "access/commit_ts.h"
#include "access/multixact.h"
#include "access/parallel.h"
#include "access/subtrans.h"
#include "access/transam.h"
#include "access/twophase.h"
#include "access/xact.h"
#include "access/xlog.h"
#include "access/xloginsert.h"
#include "access/xlogrecovery.h"
#include "access/xlogutils.h"
#include "catalog/index.h"
#include "catalog/namespace.h"
#include "catalog/pg_enum.h"
#include "catalog/storage.h"
#include "commands/async.h"
#include "commands/tablecmds.h"
#include "commands/trigger.h"
#include "commands/waitlsn.h"
#include "common/pg_prng.h"
#include "executor/spi.h"
#include "libpq/be-fsstubs.h"
#include "libpq/pqsignal.h"
#include "miscadmin.h"
#include "pg_trace.h"
#include "pgstat.h"
#include "replication/logical.h"
#include "replication/logicallauncher.h"
#include "replication/logicalworker.h"
#include "replication/origin.h"
#include "replication/snapbuild.h"
#include "replication/syncrep.h"
#include "storage/condition_variable.h"
#include "storage/fd.h"
#include "storage/lmgr.h"
#include "storage/md.h"
#include "storage/predicate.h"
#include "storage/proc.h"
#include "storage/procarray.h"
#include "storage/sinvaladt.h"
#include "storage/smgr.h"
#include "utils/builtins.h"
#include "utils/combocid.h"
#include "utils/guc.h"
#include "utils/inval.h"
#include "utils/memutils.h"
#include "utils/relmapper.h"
#include "utils/snapmgr.h"
#include "utils/timeout.h"
#include "utils/timestamp.h"
Go to the source code of this file.
Data Structures | |
struct | TransactionStateData |
struct | SerializedTransactionState |
struct | XactCallbackItem |
struct | SubXactCallbackItem |
Macros | |
#define | SerializedTransactionStateHeaderSize offsetof(SerializedTransactionState, parallelCurrentXids) |
Typedefs | |
typedef enum TransState | TransState |
typedef enum TBlockState | TBlockState |
typedef struct TransactionStateData | TransactionStateData |
typedef TransactionStateData * | TransactionState |
typedef struct SerializedTransactionState | SerializedTransactionState |
typedef struct XactCallbackItem | XactCallbackItem |
typedef struct SubXactCallbackItem | SubXactCallbackItem |
#define SerializedTransactionStateHeaderSize offsetof(SerializedTransactionState, parallelCurrentXids) |
typedef struct SerializedTransactionState SerializedTransactionState |
typedef struct SubXactCallbackItem SubXactCallbackItem |
typedef enum TBlockState TBlockState |
typedef TransactionStateData* TransactionState |
typedef struct TransactionStateData TransactionStateData |
typedef enum TransState TransState |
typedef struct XactCallbackItem XactCallbackItem |
enum TBlockState |
Definition at line 156 of file xact.c.
enum TransState |
void AbortCurrentTransaction | ( | void | ) |
Definition at line 3431 of file xact.c.
References AbortCurrentTransactionInternal().
Referenced by _SPI_commit(), _SPI_rollback(), pa_stream_abort(), PostgresMain(), ReorderBufferImmediateInvalidation(), ReorderBufferProcessTXN(), and SnapBuildClearExportedSnapshot().
|
static |
Definition at line 3449 of file xact.c.
References AbortSubTransaction(), AbortTransaction(), TransactionStateData::blockState, CleanupSubTransaction(), CleanupTransaction(), CurrentTransactionState, TransactionStateData::state, TBLOCK_ABORT, TBLOCK_ABORT_END, TBLOCK_ABORT_PENDING, TBLOCK_BEGIN, TBLOCK_DEFAULT, TBLOCK_END, TBLOCK_IMPLICIT_INPROGRESS, TBLOCK_INPROGRESS, TBLOCK_PARALLEL_INPROGRESS, TBLOCK_PREPARE, TBLOCK_STARTED, TBLOCK_SUBABORT, TBLOCK_SUBABORT_END, TBLOCK_SUBABORT_PENDING, TBLOCK_SUBABORT_RESTART, TBLOCK_SUBBEGIN, TBLOCK_SUBCOMMIT, TBLOCK_SUBINPROGRESS, TBLOCK_SUBRELEASE, TBLOCK_SUBRESTART, TRANS_DEFAULT, TRANS_INPROGRESS, and TRANS_START.
Referenced by AbortCurrentTransaction().
void AbortOutOfAnyTransaction | ( | void | ) |
Definition at line 4855 of file xact.c.
References AbortSubTransaction(), AbortTransaction(), Assert, AtAbort_Memory(), AtAbort_Portals(), AtSubAbort_Portals(), TransactionStateData::blockState, CleanupSubTransaction(), CleanupTransaction(), CurrentTransactionState, TransactionStateData::curTransactionOwner, MemoryContextSwitchTo(), TransactionStateData::parent, TransactionStateData::state, TransactionStateData::subTransactionId, TBLOCK_ABORT, TBLOCK_ABORT_END, TBLOCK_ABORT_PENDING, TBLOCK_BEGIN, TBLOCK_DEFAULT, TBLOCK_END, TBLOCK_IMPLICIT_INPROGRESS, TBLOCK_INPROGRESS, TBLOCK_PARALLEL_INPROGRESS, TBLOCK_PREPARE, TBLOCK_STARTED, TBLOCK_SUBABORT, TBLOCK_SUBABORT_END, TBLOCK_SUBABORT_PENDING, TBLOCK_SUBABORT_RESTART, TBLOCK_SUBBEGIN, TBLOCK_SUBCOMMIT, TBLOCK_SUBINPROGRESS, TBLOCK_SUBRELEASE, TBLOCK_SUBRESTART, TopMemoryContext, TRANS_DEFAULT, TRANS_INPROGRESS, and TRANS_START.
Referenced by DisableSubscriptionAndExit(), do_autovacuum(), perform_work_item(), RemoveTempRelationsCallback(), ShutdownPostgres(), start_apply(), and start_table_sync().
|
static |
Definition at line 5211 of file xact.c.
References AfterTriggerEndSubXact(), AtEOSubXact_Files(), AtEOSubXact_HashTables(), AtEOSubXact_Inval(), AtEOSubXact_LargeObject(), AtEOSubXact_Namespace(), AtEOSubXact_on_commit_actions(), AtEOSubXact_Parallel(), AtEOSubXact_PgStat(), AtEOSubXact_RelationCache(), AtEOSubXact_SPI(), AtEOXact_GUC(), AtSubAbort_childXids(), AtSubAbort_Memory(), AtSubAbort_Notify(), AtSubAbort_Portals(), AtSubAbort_ResourceOwner(), AtSubAbort_smgr(), AtSubAbort_Snapshot(), CallSubXactCallbacks(), ConditionVariableCancelSleep(), CurrentTransactionState, TransactionStateData::curTransactionOwner, elog, TransactionStateData::fullTransactionId, FullTransactionIdIsValid, TransactionStateData::gucNestLevel, HOLD_INTERRUPTS, LockErrorCleanup(), LWLockReleaseAll(), TransactionStateData::nestingLevel, TransactionStateData::parallelModeLevel, TransactionStateData::parent, pgstat_progress_end_command(), pgstat_report_wait_end(), TransactionStateData::prevSecContext, TransactionStateData::prevUser, TransactionStateData::prevXactReadOnly, RecordTransactionAbort(), reschedule_timeouts(), ResetLogicalStreamingState(), ResetReindexState(), RESOURCE_RELEASE_AFTER_LOCKS, RESOURCE_RELEASE_BEFORE_LOCKS, RESOURCE_RELEASE_LOCKS, ResourceOwnerRelease(), RESUME_INTERRUPTS, SetUserIdAndSecContext(), ShowTransactionState(), TransactionStateData::state, TransactionStateData::subTransactionId, SUBXACT_EVENT_ABORT_SUB, TRANS_ABORT, TRANS_INPROGRESS, TransStateAsString(), UnBlockSig, UnlockBuffers(), WARNING, XactReadOnly, and XLogResetInsertion().
Referenced by AbortCurrentTransactionInternal(), AbortOutOfAnyTransaction(), CommitTransactionCommandInternal(), and RollbackAndReleaseCurrentSubTransaction().
|
static |
Definition at line 2788 of file xact.c.
References AfterTriggerEndXact(), Assert, AtAbort_Memory(), AtAbort_Notify(), AtAbort_Portals(), AtAbort_ResourceOwner(), AtAbort_Twophase(), AtEOXact_ApplyLauncher(), AtEOXact_Buffers(), AtEOXact_ComboCid(), AtEOXact_Enum(), AtEOXact_Files(), AtEOXact_GUC(), AtEOXact_HashTables(), AtEOXact_Inval(), AtEOXact_LargeObject(), AtEOXact_LogicalRepWorkers(), AtEOXact_MultiXact(), AtEOXact_Namespace(), AtEOXact_on_commit_actions(), AtEOXact_Parallel(), AtEOXact_PgStat(), AtEOXact_RelationCache(), AtEOXact_RelationMap(), AtEOXact_SMgr(), AtEOXact_SPI(), TransactionStateData::blockState, CallXactCallbacks(), ConditionVariableCancelSleep(), CurrentTransactionState, disable_timeout(), elog, HOLD_INTERRUPTS, InvalidTransactionId, LockErrorCleanup(), LWLockReleaseAll(), PGPROC::lxid, MyProc, TransactionStateData::nestingLevel, TransactionStateData::parallelChildXact, TransactionStateData::parallelModeLevel, TransactionStateData::parent, pgstat_progress_end_command(), pgstat_report_wait_end(), pgstat_report_xact_timestamp(), TransactionStateData::prevSecContext, TransactionStateData::prevUser, ProcArrayEndTransaction(), RecordTransactionAbort(), reschedule_timeouts(), ResetLogicalStreamingState(), ResetReindexState(), RESOURCE_RELEASE_AFTER_LOCKS, RESOURCE_RELEASE_BEFORE_LOCKS, RESOURCE_RELEASE_LOCKS, ResourceOwnerRelease(), RESUME_INTERRUPTS, SetUserIdAndSecContext(), smgrDoPendingDeletes(), smgrDoPendingSyncs(), SnapBuildResetExportedSnapshotState(), TransactionStateData::state, TBLOCK_PARALLEL_INPROGRESS, TopTransactionResourceOwner, TRANS_ABORT, TRANS_INPROGRESS, TRANS_PREPARE, TRANSACTION_TIMEOUT, TransactionTimeout, TransStateAsString(), UnBlockSig, UnlockBuffers(), PGPROC::vxid, WaitLSNCleanup(), WARNING, XACT_EVENT_ABORT, XACT_EVENT_PARALLEL_ABORT, XactLastRecEnd, XLogResetInsertion(), and XLogSetAsyncXactLSN().
Referenced by AbortCurrentTransactionInternal(), AbortOutOfAnyTransaction(), and CommitTransactionCommandInternal().
|
static |
Definition at line 634 of file xact.c.
References Assert, CurrentResourceOwner, TransactionStateData::curTransactionOwner, TransactionStateData::didLogXid, ereport, errcode(), errmsg(), ERROR, TransactionStateData::fullTransactionId, FullTransactionIdIsValid, GetNewTransactionId(), GetTopTransactionId(), IsInParallelMode(), IsParallelWorker, MinSizeOfXactAssignment, TransactionStateData::nestingLevel, xl_xact_assignment::nsubxacts, nUnreportedXids, palloc(), TransactionStateData::parent, pfree(), PGPROC_MAX_CACHED_SUBXIDS, RegisterPredicateLockingXid(), TransactionStateData::state, SubTransSetParent(), TopTransactionStateData, TRANS_INPROGRESS, TransactionIdIsValid, unreportedXids, XactLockTableInsert(), XactTopFullTransactionId, XidFromFullTransactionId, XLOG_XACT_ASSIGNMENT, XLogBeginInsert(), XLogInsert(), XLogLogicalInfoActive, XLogRegisterData(), XLogStandbyInfoActive, and xl_xact_assignment::xtop.
Referenced by GetCurrentFullTransactionId(), GetCurrentTransactionId(), GetTopFullTransactionId(), and GetTopTransactionId().
|
static |
Definition at line 1873 of file xact.c.
References MemoryContextSwitchTo(), TopMemoryContext, and TransactionAbortContext.
Referenced by AbortOutOfAnyTransaction(), and AbortTransaction().
|
static |
Definition at line 1905 of file xact.c.
References CurrentResourceOwner, and TopTransactionResourceOwner.
Referenced by AbortTransaction().
|
static |
Definition at line 1568 of file xact.c.
References AtCCI_RelationMap(), and CommandEndInvalidationMessages().
Referenced by CommandCounterIncrement().
|
static |
Definition at line 1963 of file xact.c.
References Assert, CurrentTransactionState, TransactionStateData::curTransactionContext, CurTransactionContext, MemoryContextReset(), MemoryContextSwitchTo(), TransactionStateData::parent, TransactionStateData::priorContext, TopTransactionContext, and TransactionAbortContext.
Referenced by CleanupTransaction().
|
static |
Definition at line 1587 of file xact.c.
References Assert, CurrentTransactionState, TransactionStateData::curTransactionContext, CurTransactionContext, MemoryContextReset(), MemoryContextSwitchTo(), TransactionStateData::priorContext, and TopTransactionContext.
Referenced by CommitTransaction(), and PrepareTransaction().
|
static |
Definition at line 1166 of file xact.c.
References AcceptInvalidationMessages().
Referenced by StartTransaction().
|
static |
Definition at line 1175 of file xact.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, CurrentMemoryContext, CurrentTransactionState, TransactionStateData::curTransactionContext, CurTransactionContext, MemoryContextSwitchTo(), TransactionStateData::priorContext, TopMemoryContext, TopTransactionContext, and TransactionAbortContext.
Referenced by StartTransaction().
|
static |
Definition at line 1225 of file xact.c.
References Assert, CurrentResourceOwner, CurrentTransactionState, TransactionStateData::curTransactionOwner, CurTransactionResourceOwner, ResourceOwnerCreate(), and TopTransactionResourceOwner.
Referenced by StartTransaction().
|
static |
Definition at line 1931 of file xact.c.
References TransactionStateData::childXids, CurrentTransactionState, TransactionStateData::maxChildXids, TransactionStateData::nChildXids, and pfree().
Referenced by AbortSubTransaction().
|
static |
Definition at line 1893 of file xact.c.
References Assert, MemoryContextSwitchTo(), and TransactionAbortContext.
Referenced by AbortSubTransaction().
|
static |
Definition at line 1918 of file xact.c.
References CurrentResourceOwner, CurrentTransactionState, and TransactionStateData::curTransactionOwner.
Referenced by AbortSubTransaction().
|
static |
Definition at line 2011 of file xact.c.
References Assert, CurrentTransactionState, TransactionStateData::curTransactionContext, CurTransactionContext, MemoryContextDelete(), MemoryContextReset(), MemoryContextSwitchTo(), TransactionStateData::parent, TransactionStateData::priorContext, and TransactionAbortContext.
Referenced by CleanupSubTransaction().
|
static |
Definition at line 1653 of file xact.c.
References Assert, TransactionStateData::childXids, CurrentTransactionState, ereport, errcode(), errmsg(), ERROR, TransactionStateData::fullTransactionId, MaxAllocSize, TransactionStateData::maxChildXids, MemoryContextAlloc(), Min, TransactionStateData::nChildXids, TransactionStateData::parent, pfree(), repalloc(), TopTransactionContext, and XidFromFullTransactionId.
Referenced by CommitSubTransaction().
|
static |
Definition at line 1624 of file xact.c.
References Assert, CurrentTransactionState, TransactionStateData::curTransactionContext, CurTransactionContext, MemoryContextDelete(), MemoryContextIsEmpty(), MemoryContextSwitchTo(), and TransactionStateData::parent.
Referenced by CommitSubTransaction().
|
static |
Definition at line 1253 of file xact.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, Assert, CurrentMemoryContext, CurrentTransactionState, TransactionStateData::curTransactionContext, CurTransactionContext, MemoryContextSwitchTo(), and TransactionStateData::priorContext.
Referenced by StartSubTransaction().
|
static |
Definition at line 1282 of file xact.c.
References Assert, CurrentResourceOwner, CurrentTransactionState, TransactionStateData::curTransactionOwner, CurTransactionResourceOwner, TransactionStateData::parent, and ResourceOwnerCreate().
Referenced by StartSubTransaction().
void BeginImplicitTransactionBlock | ( | void | ) |
Definition at line 4319 of file xact.c.
References TransactionStateData::blockState, CurrentTransactionState, TBLOCK_IMPLICIT_INPROGRESS, and TBLOCK_STARTED.
Referenced by exec_simple_query().
void BeginInternalSubTransaction | ( | const char * | name | ) |
Definition at line 4687 of file xact.c.
References TransactionStateData::blockState, BlockStateAsString(), CommitTransactionCommand(), CurrentTransactionState, elog, ExitOnAnyError, FATAL, MemoryContextStrdup(), TransactionStateData::name, name, PushTransaction(), StartTransactionCommand(), TBLOCK_ABORT, TBLOCK_ABORT_END, TBLOCK_ABORT_PENDING, TBLOCK_BEGIN, TBLOCK_DEFAULT, TBLOCK_END, TBLOCK_IMPLICIT_INPROGRESS, TBLOCK_INPROGRESS, TBLOCK_PARALLEL_INPROGRESS, TBLOCK_PREPARE, TBLOCK_STARTED, TBLOCK_SUBABORT, TBLOCK_SUBABORT_END, TBLOCK_SUBABORT_PENDING, TBLOCK_SUBABORT_RESTART, TBLOCK_SUBBEGIN, TBLOCK_SUBCOMMIT, TBLOCK_SUBINPROGRESS, TBLOCK_SUBRELEASE, TBLOCK_SUBRESTART, and TopTransactionContext.
Referenced by exec_stmt_block(), plperl_spi_exec(), plperl_spi_exec_prepared(), plperl_spi_fetchrow(), plperl_spi_prepare(), plperl_spi_query(), plperl_spi_query_prepared(), pltcl_returnnext(), pltcl_subtrans_begin(), pltcl_subtransaction(), PLy_spi_subtransaction_begin(), PLy_subtransaction_enter(), ReorderBufferImmediateInvalidation(), and ReorderBufferProcessTXN().
void BeginTransactionBlock | ( | void | ) |
Definition at line 3917 of file xact.c.
References TransactionStateData::blockState, BlockStateAsString(), CurrentTransactionState, elog, ereport, errcode(), errmsg(), FATAL, TBLOCK_ABORT, TBLOCK_ABORT_END, TBLOCK_ABORT_PENDING, TBLOCK_BEGIN, TBLOCK_DEFAULT, TBLOCK_END, TBLOCK_IMPLICIT_INPROGRESS, TBLOCK_INPROGRESS, TBLOCK_PARALLEL_INPROGRESS, TBLOCK_PREPARE, TBLOCK_STARTED, TBLOCK_SUBABORT, TBLOCK_SUBABORT_END, TBLOCK_SUBABORT_PENDING, TBLOCK_SUBABORT_RESTART, TBLOCK_SUBBEGIN, TBLOCK_SUBCOMMIT, TBLOCK_SUBINPROGRESS, TBLOCK_SUBRELEASE, TBLOCK_SUBRESTART, and WARNING.
Referenced by apply_handle_prepare_internal(), pa_start_subtrans(), and standard_ProcessUtility().
|
static |
Definition at line 5694 of file xact.c.
References TBLOCK_ABORT, TBLOCK_ABORT_END, TBLOCK_ABORT_PENDING, TBLOCK_BEGIN, TBLOCK_DEFAULT, TBLOCK_END, TBLOCK_IMPLICIT_INPROGRESS, TBLOCK_INPROGRESS, TBLOCK_PARALLEL_INPROGRESS, TBLOCK_PREPARE, TBLOCK_STARTED, TBLOCK_SUBABORT, TBLOCK_SUBABORT_END, TBLOCK_SUBABORT_PENDING, TBLOCK_SUBABORT_RESTART, TBLOCK_SUBBEGIN, TBLOCK_SUBCOMMIT, TBLOCK_SUBINPROGRESS, TBLOCK_SUBRELEASE, and TBLOCK_SUBRESTART.
Referenced by BeginInternalSubTransaction(), BeginTransactionBlock(), CommitTransactionCommandInternal(), DefineSavepoint(), EndTransactionBlock(), ReleaseCurrentSubTransaction(), ReleaseSavepoint(), RollbackAndReleaseCurrentSubTransaction(), RollbackToSavepoint(), ShowTransactionStateRec(), StartTransactionCommand(), TransactionBlockStatusCode(), and UserAbortTransactionBlock().
|
static |
Definition at line 3891 of file xact.c.
References SubXactCallbackItem::arg, SubXactCallbackItem::callback, next, SubXactCallbackItem::next, and SubXact_callbacks.
Referenced by AbortSubTransaction(), CommitSubTransaction(), and StartSubTransaction().
|
static |
Definition at line 3831 of file xact.c.
References XactCallbackItem::arg, XactCallbackItem::callback, next, XactCallbackItem::next, and Xact_callbacks.
Referenced by AbortTransaction(), CommitTransaction(), and PrepareTransaction().
|
static |
Definition at line 3715 of file xact.c.
References ereport, errcode(), errmsg(), ERROR, IsSubTransaction(), IsTransactionBlock(), and WARNING.
Referenced by RequireTransactionBlock(), and WarnNoTransactionBlock().
|
static |
Definition at line 5370 of file xact.c.
References AtSubCleanup_Memory(), AtSubCleanup_Portals(), CurrentResourceOwner, CurrentTransactionState, TransactionStateData::curTransactionOwner, CurTransactionResourceOwner, elog, TransactionStateData::parent, PopTransaction(), ResourceOwnerDelete(), ShowTransactionState(), TransactionStateData::state, TransactionStateData::subTransactionId, TRANS_ABORT, TRANS_DEFAULT, TransStateAsString(), and WARNING.
Referenced by AbortCurrentTransactionInternal(), AbortOutOfAnyTransaction(), CommitTransactionCommandInternal(), and RollbackAndReleaseCurrentSubTransaction().
|
static |
Definition at line 2989 of file xact.c.
References AtCleanup_Memory(), AtCleanup_Portals(), AtEOXact_Snapshot(), TransactionStateData::childXids, CurrentResourceOwner, CurrentTransactionState, TransactionStateData::curTransactionOwner, CurTransactionResourceOwner, elog, FATAL, TransactionStateData::fullTransactionId, TransactionStateData::gucNestLevel, InvalidFullTransactionId, InvalidSubTransactionId, TransactionStateData::maxChildXids, TransactionStateData::nChildXids, TransactionStateData::nestingLevel, nParallelCurrentXids, TransactionStateData::parallelChildXact, TransactionStateData::parallelModeLevel, ResourceOwnerDelete(), TransactionStateData::state, TransactionStateData::subTransactionId, TopTransactionResourceOwner, TRANS_ABORT, TRANS_DEFAULT, TransStateAsString(), and XactTopFullTransactionId.
Referenced by AbortCurrentTransactionInternal(), AbortOutOfAnyTransaction(), and CommitTransactionCommandInternal().
void CommandCounterIncrement | ( | void | ) |
Definition at line 1099 of file xact.c.
References AtCCI_LocalCache(), currentCommandId, currentCommandIdUsed, ereport, errcode(), errmsg(), ERROR, InvalidCommandId, IsInParallelMode(), IsParallelWorker, and SnapshotSetCommandId().
Referenced by _SPI_execute_plan(), acquire_inherited_sample_rows(), addFkConstraint(), AddRoleMems(), AlterPublicationOptions(), AlterRole(), ATAddCheckConstraint(), ATExecAddColumn(), ATExecAlterColumnType(), ATExecCmd(), ATExecDropColumn(), ATExecDropConstraint(), ATExecDropExpression(), ATExecDropIdentity(), ATExecSetAccessMethodNoStorage(), ATExecSetCompression(), ATExecSetExpression(), ATExecSetTableSpace(), ATExecSetTableSpaceNoStorage(), ATParseTransformCmd(), ATRewriteTables(), AttachPartitionEnsureIndexes(), btadjustmembers(), CommitSubTransaction(), CommitTransactionCommandInternal(), copy_table_data(), create_ctas_internal(), create_toast_table(), CreateFKCheckTrigger(), createForeignKeyActionTriggers(), CreateForeignTable(), CreatePublication(), CreateRole(), CreateSchemaCommand(), CreateTriggerFiringOn(), DefineCollation(), DefineDomain(), DefineIndex(), DefineRelation(), DefineVirtualRelation(), deleteOneObject(), DetachPartitionFinalize(), do_analyze_rel(), DropClonedTriggersFromPartition(), DropRole(), end_replication_step(), EventTriggerDDLCommandEnd(), EventTriggerDDLCommandStart(), EventTriggerInvoke(), EventTriggerSQLDrop(), EventTriggerTableRewrite(), exec_eval_simple_expr(), exec_execute_message(), exec_parse_message(), exec_simple_query(), ExecGrant_common(), ExecGrant_Largeobject(), ExecGrant_Parameter(), ExecGrant_Relation(), execute_sql_string(), ExplainOnePlan(), finish_heap_swap(), fmgr_sql(), hashadjustmembers(), ImportForeignSchema(), index_build(), index_create(), IndexSetParentIndex(), InitTempTableNamespace(), inv_create(), inv_drop(), inv_truncate(), inv_write(), LogicalRepSyncTableStart(), make_new_heap(), makeConfigurationDependencies(), moveArrayTypeName(), objectNamesToOids(), OperatorShellMake(), OperatorUpd(), pg_import_system_collations(), PortalRunMulti(), ProcedureCreate(), process_syncing_tables_for_apply(), ProcessUtilitySlow(), recordExtensionInitPrivWorker(), reindex_index(), reindex_relation(), ReindexRelationConcurrently(), RelationSetNewRelfilenumber(), RemoveRoleFromInitPriv(), RemoveRoleFromObjectPolicy(), RenumberEnumType(), ReplaceRoleInInitPriv(), replorigin_create(), replorigin_drop_by_name(), ri_PerformCheck(), SetDatabaseHasLoginEventTriggers(), SetDefaultACL(), SetMatViewPopulatedState(), shdepReassignOwned(), SPI_cursor_open_internal(), standard_ProcessUtility(), StoreConstraints(), StorePartitionBound(), tryAttachPartitionForeignKey(), vacuum(), and validatePartitionedIndex().
|
static |
Definition at line 5097 of file xact.c.
References AfterTriggerEndSubXact(), AtEOSubXact_Files(), AtEOSubXact_HashTables(), AtEOSubXact_Inval(), AtEOSubXact_LargeObject(), AtEOSubXact_Namespace(), AtEOSubXact_on_commit_actions(), AtEOSubXact_Parallel(), AtEOSubXact_PgStat(), AtEOSubXact_RelationCache(), AtEOSubXact_SPI(), AtEOXact_GUC(), AtSubCommit_childXids(), AtSubCommit_Memory(), AtSubCommit_Notify(), AtSubCommit_Portals(), AtSubCommit_smgr(), AtSubCommit_Snapshot(), CallSubXactCallbacks(), CommandCounterIncrement(), CurrentResourceOwner, CurrentTransactionState, TransactionStateData::curTransactionOwner, CurTransactionResourceOwner, elog, TransactionStateData::fullTransactionId, FullTransactionIdIsValid, TransactionStateData::gucNestLevel, TransactionStateData::nestingLevel, TransactionStateData::parallelModeLevel, TransactionStateData::parent, PopTransaction(), TransactionStateData::prevXactReadOnly, RESOURCE_RELEASE_AFTER_LOCKS, RESOURCE_RELEASE_BEFORE_LOCKS, RESOURCE_RELEASE_LOCKS, ResourceOwnerDelete(), ResourceOwnerRelease(), ShowTransactionState(), TransactionStateData::state, TransactionStateData::subTransactionId, SUBXACT_EVENT_COMMIT_SUB, SUBXACT_EVENT_PRE_COMMIT_SUB, TRANS_COMMIT, TRANS_DEFAULT, TRANS_INPROGRESS, TransStateAsString(), WARNING, XactLockTableDelete(), XactReadOnly, and XidFromFullTransactionId.
Referenced by CommitTransactionCommandInternal(), and ReleaseCurrentSubTransaction().
|
static |
Definition at line 2217 of file xact.c.
References AfterTriggerEndXact(), AfterTriggerFireDeferred(), Assert, AtCommit_Memory(), AtCommit_Notify(), AtEOXact_ApplyLauncher(), AtEOXact_Buffers(), AtEOXact_ComboCid(), AtEOXact_Enum(), AtEOXact_Files(), AtEOXact_GUC(), AtEOXact_HashTables(), AtEOXact_Inval(), AtEOXact_LargeObject(), AtEOXact_LogicalRepWorkers(), AtEOXact_MultiXact(), AtEOXact_Namespace(), AtEOXact_on_commit_actions(), AtEOXact_Parallel(), AtEOXact_PgStat(), AtEOXact_RelationCache(), AtEOXact_RelationMap(), AtEOXact_SMgr(), AtEOXact_Snapshot(), AtEOXact_SPI(), TransactionStateData::blockState, CallXactCallbacks(), TransactionStateData::childXids, CurrentResourceOwner, CurrentTransactionState, TransactionStateData::curTransactionOwner, CurTransactionResourceOwner, disable_timeout(), elog, EnterParallelMode(), TransactionStateData::fullTransactionId, TransactionStateData::gucNestLevel, HOLD_INTERRUPTS, InvalidFullTransactionId, InvalidSubTransactionId, InvalidTransactionId, PGPROC::lxid, TransactionStateData::maxChildXids, MyProc, TransactionStateData::nChildXids, TransactionStateData::nestingLevel, nParallelCurrentXids, TransactionStateData::parallelChildXact, TransactionStateData::parallelModeLevel, ParallelWorkerReportLastRecEnd(), TransactionStateData::parent, pgstat_report_xact_timestamp(), PreCommit_CheckForSerializationFailure(), PreCommit_Notify(), PreCommit_on_commit_actions(), PreCommit_Portals(), ProcArrayEndTransaction(), RecordTransactionCommit(), RESOURCE_RELEASE_AFTER_LOCKS, RESOURCE_RELEASE_BEFORE_LOCKS, RESOURCE_RELEASE_LOCKS, ResourceOwnerDelete(), ResourceOwnerRelease(), RESUME_INTERRUPTS, ShowTransactionState(), smgrDoPendingDeletes(), smgrDoPendingSyncs(), TransactionStateData::state, TransactionStateData::subTransactionId, TBLOCK_PARALLEL_INPROGRESS, TopTransactionResourceOwner, TRANS_COMMIT, TRANS_DEFAULT, TRANS_INPROGRESS, TRANSACTION_TIMEOUT, TransactionTimeout, TransStateAsString(), PGPROC::vxid, WARNING, XACT_EVENT_COMMIT, XACT_EVENT_PARALLEL_COMMIT, XACT_EVENT_PARALLEL_PRE_COMMIT, XACT_EVENT_PRE_COMMIT, XactLastRecEnd, and XactTopFullTransactionId.
Referenced by CommitTransactionCommandInternal(), EndParallelWorkerTransaction(), EndRestoreLOs(), restore_toc_entries_prefork(), restore_toc_entry(), and RestoreArchive().
void CommitTransactionCommand | ( | void | ) |
Definition at line 3137 of file xact.c.
References CommitTransactionCommandInternal().
Referenced by _SPI_commit(), AllTablesyncsReady(), apply_handle_commit_internal(), apply_handle_commit_prepared(), apply_handle_prepare(), apply_handle_prepare_internal(), apply_handle_rollback_prepared(), apply_handle_stream_prepare(), ATExecDetachPartition(), autoprewarm_database_main(), bbsink_server_new(), BeginInternalSubTransaction(), BootstrapModeMain(), clear_subscription_skip_lsn(), cluster_multiple_rels(), DefineIndex(), DisableSubscriptionAndExit(), do_autovacuum(), EventTriggerOnLogin(), exec_replication_command(), finish_xact_command(), get_database_list(), get_subscription_list(), IdentifySystem(), index_drop(), initialize_worker_spi(), InitializeLogRepWorker(), InitPostgres(), LogicalRepSyncTableStart(), maybe_reread_subscription(), movedb(), pa_start_subtrans(), pa_stream_abort(), ParallelApplyWorkerMain(), ParallelWorkerMain(), pg_attribute_noreturn(), process_syncing_tables_for_apply(), process_syncing_tables_for_sync(), ProcessCatchupInterrupt(), ProcessIncomingNotify(), ReindexMultipleInternal(), ReindexRelationConcurrently(), RemoveTempRelationsCallback(), run_apply_worker(), shell_check_detail(), stream_abort_internal(), stream_stop_internal(), synchronize_slots(), vacuum(), vacuum_rel(), validate_remote_info(), and worker_spi_main().
|
static |
Definition at line 3155 of file xact.c.
References AbortSubTransaction(), AbortTransaction(), Assert, TransactionStateData::blockState, BlockStateAsString(), TransactionStateData::chain, CleanupSubTransaction(), CleanupTransaction(), CommandCounterIncrement(), CommitSubTransaction(), CommitTransaction(), CurrentTransactionState, DefineSavepoint(), elog, ERROR, FATAL, TransactionStateData::name, name, TransactionStateData::parent, PrepareTransaction(), RestoreTransactionCharacteristics(), TransactionStateData::savepointLevel, SaveTransactionCharacteristics(), StartSubTransaction(), StartTransaction(), TBLOCK_ABORT, TBLOCK_ABORT_END, TBLOCK_ABORT_PENDING, TBLOCK_BEGIN, TBLOCK_DEFAULT, TBLOCK_END, TBLOCK_IMPLICIT_INPROGRESS, TBLOCK_INPROGRESS, TBLOCK_PARALLEL_INPROGRESS, TBLOCK_PREPARE, TBLOCK_STARTED, TBLOCK_SUBABORT, TBLOCK_SUBABORT_END, TBLOCK_SUBABORT_PENDING, TBLOCK_SUBABORT_RESTART, TBLOCK_SUBBEGIN, TBLOCK_SUBCOMMIT, TBLOCK_SUBINPROGRESS, TBLOCK_SUBRELEASE, and TBLOCK_SUBRESTART.
Referenced by CommitTransactionCommand().
void DefineSavepoint | ( | const char * | name | ) |
Definition at line 4366 of file xact.c.
References TransactionStateData::blockState, BlockStateAsString(), CurrentTransactionState, elog, ereport, errcode(), errmsg(), ERROR, FATAL, IsInParallelMode(), IsParallelWorker, MemoryContextStrdup(), TransactionStateData::name, name, PushTransaction(), TBLOCK_ABORT, TBLOCK_ABORT_END, TBLOCK_ABORT_PENDING, TBLOCK_BEGIN, TBLOCK_DEFAULT, TBLOCK_END, TBLOCK_IMPLICIT_INPROGRESS, TBLOCK_INPROGRESS, TBLOCK_PARALLEL_INPROGRESS, TBLOCK_PREPARE, TBLOCK_STARTED, TBLOCK_SUBABORT, TBLOCK_SUBABORT_END, TBLOCK_SUBABORT_PENDING, TBLOCK_SUBABORT_RESTART, TBLOCK_SUBBEGIN, TBLOCK_SUBCOMMIT, TBLOCK_SUBINPROGRESS, TBLOCK_SUBRELEASE, TBLOCK_SUBRESTART, and TopTransactionContext.
Referenced by CommitTransactionCommandInternal(), pa_start_subtrans(), and standard_ProcessUtility().
void EndImplicitTransactionBlock | ( | void | ) |
Definition at line 4344 of file xact.c.
References TransactionStateData::blockState, CurrentTransactionState, TBLOCK_IMPLICIT_INPROGRESS, and TBLOCK_STARTED.
Referenced by exec_simple_query().
void EndParallelWorkerTransaction | ( | void | ) |
Definition at line 5623 of file xact.c.
References Assert, TransactionStateData::blockState, CommitTransaction(), CurrentTransactionState, TBLOCK_DEFAULT, and TBLOCK_PARALLEL_INPROGRESS.
Referenced by ParallelWorkerMain().
Definition at line 4037 of file xact.c.
References Assert, TransactionStateData::blockState, BlockStateAsString(), TransactionStateData::chain, CurrentTransactionState, elog, ereport, errcode(), errmsg(), ERROR, FATAL, TransactionStateData::parent, TBLOCK_ABORT, TBLOCK_ABORT_END, TBLOCK_ABORT_PENDING, TBLOCK_BEGIN, TBLOCK_DEFAULT, TBLOCK_END, TBLOCK_IMPLICIT_INPROGRESS, TBLOCK_INPROGRESS, TBLOCK_PARALLEL_INPROGRESS, TBLOCK_PREPARE, TBLOCK_STARTED, TBLOCK_SUBABORT, TBLOCK_SUBABORT_END, TBLOCK_SUBABORT_PENDING, TBLOCK_SUBABORT_RESTART, TBLOCK_SUBBEGIN, TBLOCK_SUBCOMMIT, TBLOCK_SUBINPROGRESS, TBLOCK_SUBRELEASE, TBLOCK_SUBRESTART, and WARNING.
Referenced by apply_handle_commit_internal(), pa_stream_abort(), PrepareTransactionBlock(), and standard_ProcessUtility().
void EnterParallelMode | ( | void | ) |
Definition at line 1050 of file xact.c.
References Assert, CurrentTransactionState, and TransactionStateData::parallelModeLevel.
Referenced by _brin_begin_parallel(), _bt_begin_parallel(), CommitTransaction(), ExecutePlan(), parallel_vacuum_init(), and ParallelWorkerMain().
Size EstimateTransactionStateSpace | ( | void | ) |
Definition at line 5499 of file xact.c.
References add_size(), CurrentTransactionState, TransactionStateData::fullTransactionId, FullTransactionIdIsValid, mul_size(), TransactionStateData::nChildXids, TransactionStateData::parent, SerializedTransactionStateHeaderSize, and size.
Referenced by InitializeParallelDSM().
void ExitParallelMode | ( | void | ) |
Definition at line 1063 of file xact.c.
References Assert, CurrentTransactionState, TransactionStateData::parallelChildXact, ParallelContextActive(), and TransactionStateData::parallelModeLevel.
Referenced by _brin_begin_parallel(), _brin_end_parallel(), _bt_begin_parallel(), _bt_end_parallel(), ExecutePlan(), parallel_vacuum_end(), and ParallelWorkerMain().
void ForceSyncCommit | ( | void | ) |
Definition at line 1151 of file xact.c.
References forceSyncCommit.
Referenced by createdb(), CreateTableSpace(), dropdb(), DropTableSpace(), and movedb().
Definition at line 828 of file xact.c.
References currentCommandId, currentCommandIdUsed, ereport, errcode(), errmsg(), ERROR, and IsParallelWorker.
Referenced by ATRewriteTable(), CatalogTuplesMultiInsertWithInfo(), CopyFrom(), create_edata_for_relation(), create_estate_for_relation(), FindConflictTuple(), GetSnapshotData(), GetSnapshotDataReuse(), heap_inplace_lock(), intorel_startup(), pgrowlocks(), RegisterRelcacheInvalidation(), RelationFindReplTupleByIndex(), RelationFindReplTupleSeq(), simple_heap_delete(), simple_heap_insert(), simple_heap_update(), simple_table_tuple_delete(), simple_table_tuple_insert(), simple_table_tuple_update(), standard_ExecutorStart(), toast_save_datum(), transientrel_startup(), and UpdateActiveSnapshotCommandId().
FullTransactionId GetCurrentFullTransactionId | ( | void | ) |
Definition at line 511 of file xact.c.
References AssignTransactionId(), CurrentTransactionState, TransactionStateData::fullTransactionId, and FullTransactionIdIsValid.
FullTransactionId GetCurrentFullTransactionIdIfAny | ( | void | ) |
Definition at line 529 of file xact.c.
References CurrentTransactionState, and TransactionStateData::fullTransactionId.
TimestampTz GetCurrentStatementStartTimestamp | ( | void | ) |
Definition at line 878 of file xact.c.
References stmtStartTimestamp.
Referenced by check_log_duration(), CreatePortal(), InitializeParallelDSM(), pgstat_report_activity(), statement_timestamp(), and StorePreparedStatement().
SubTransactionId GetCurrentSubTransactionId | ( | void | ) |
Definition at line 790 of file xact.c.
References CurrentTransactionState, and TransactionStateData::subTransactionId.
Referenced by _SPI_begin_call(), AllocateDir(), AllocateFile(), be_lo_open(), CopyFrom(), CreateParallelContext(), CreatePortal(), ExecuteTruncateGuts(), init_sql_fcache(), InitTempTableNamespace(), MarkPortalActive(), OpenPipeStream(), OpenTransientFilePerm(), plpgsql_create_econtext(), plpgsql_inline_handler(), register_on_commit_action(), RelationAssumeNewRelfilelocator(), RelationBuildLocalRelation(), RelationForgetRelation(), remove_on_commit_action(), sepgsql_set_client_label(), SPI_connect_ext(), and spi_dest_startup().
TransactionId GetCurrentTransactionId | ( | void | ) |
Definition at line 453 of file xact.c.
References AssignTransactionId(), CurrentTransactionState, TransactionStateData::fullTransactionId, FullTransactionIdIsValid, and XidFromFullTransactionId.
Referenced by asyncQueueNotificationToEntry(), check_exclusion_or_unique_constraint(), ExecInsert(), heap_abort_speculative(), heap_delete(), heap_insert(), heap_lock_tuple(), heap_multi_insert(), heap_update(), LogAccessExclusiveLock(), LogAccessExclusiveLockPrepare(), logical_rewrite_log_mapping(), LogLogicalMessage(), PreCommit_Notify(), PrepareTransaction(), RelationSetNewRelfilenumber(), ReorderBufferProcessTXN(), and test_create_multixact().
TransactionId GetCurrentTransactionIdIfAny | ( | void | ) |
Definition at line 470 of file xact.c.
References CurrentTransactionState, TransactionStateData::fullTransactionId, and XidFromFullTransactionId.
Referenced by IsSubxactTopXidLogPending(), RecordTransactionAbort(), ReorderBufferProcessTXN(), and XLogRecordAssemble().
int GetCurrentTransactionNestLevel | ( | void | ) |
Definition at line 928 of file xact.c.
References CurrentTransactionState, and TransactionStateData::nestingLevel.
Referenced by AddEnumLabel(), AfterTriggerBeginSubXact(), AfterTriggerEndSubXact(), AfterTriggerSetState(), Async_Notify(), AtEOSubXact_Inval(), AtSubAbort_Notify(), AtSubCommit_Notify(), AtSubCommit_smgr(), begin_remote_xact(), create_drop_transactional_internal(), CreatePortal(), ensure_tabstat_xact_level(), EnumValuesCreate(), pgfdw_subxact_callback(), pgstat_drop_relation(), PrepareInvalidationState(), PushActiveSnapshot(), queue_listen(), register_seq_scan(), RelationCreateStorage(), RelationDropStorage(), RelationMapUpdateMap(), RestoreReindexState(), SetReindexPending(), SetReindexProcessing(), smgrDoPendingDeletes(), smgrDoPendingSyncs(), and smgrGetPendingDeletes().
TimestampTz GetCurrentTransactionStartTimestamp | ( | void | ) |
Definition at line 869 of file xact.c.
References xactStartTimestamp.
Referenced by GetCurrentTimeUsec(), GetSQLCurrentTimestamp(), GetSQLLocalTimestamp(), InitializeParallelDSM(), now(), pg_timezone_abbrevs(), and timetz_zone().
TimestampTz GetCurrentTransactionStopTimestamp | ( | void | ) |
Definition at line 890 of file xact.c.
References Assert, CurrentTransactionState, GetCurrentTimestamp(), PG_USED_FOR_ASSERTS_ONLY, TRANS_ABORT, TRANS_COMMIT, TRANS_DEFAULT, TRANS_PREPARE, and xactStopTimestamp.
Referenced by pgstat_relation_flush_cb(), pgstat_report_stat(), RecordTransactionAbort(), and RecordTransactionCommit().
TransactionId GetStableLatestTransactionId | ( | void | ) |
Definition at line 606 of file xact.c.
References Assert, GetTopTransactionIdIfAny(), InvalidLocalTransactionId, InvalidTransactionId, PGPROC::lxid, MyProc, ReadNextTransactionId(), TransactionIdIsValid, and PGPROC::vxid.
Referenced by xid_age().
FullTransactionId GetTopFullTransactionId | ( | void | ) |
Definition at line 482 of file xact.c.
References AssignTransactionId(), FullTransactionIdIsValid, TopTransactionStateData, and XactTopFullTransactionId.
Referenced by pg_current_xact_id().
FullTransactionId GetTopFullTransactionIdIfAny | ( | void | ) |
Definition at line 498 of file xact.c.
References XactTopFullTransactionId.
Referenced by pg_current_xact_id_if_assigned().
TransactionId GetTopTransactionId | ( | void | ) |
Definition at line 425 of file xact.c.
References AssignTransactionId(), FullTransactionIdIsValid, TopTransactionStateData, XactTopFullTransactionId, and XidFromFullTransactionId.
Referenced by AlterSequence(), AssignTransactionId(), consume_xids_common(), do_setval(), fill_seq_fork_with_data(), log_heap_new_cid(), nextval_internal(), and SequenceChangePersistence().
TransactionId GetTopTransactionIdIfAny | ( | void | ) |
Definition at line 440 of file xact.c.
References XactTopFullTransactionId, and XidFromFullTransactionId.
Referenced by CheckForSerializableConflictOut(), ConditionalXactLockTableWait(), CreateInitDecodingContext(), ExportSnapshot(), GetSerializableTransactionSnapshotInt(), GetStableLatestTransactionId(), HeapCheckForSerializableConflictOut(), ImportSnapshot(), index_drop(), initSpGistState(), log_status_format(), RecordTransactionCommit(), TransactionIdIsCurrentTransactionId(), write_csvlog(), write_jsonlog(), XactLockTableWait(), XidIsConcurrent(), and XLogRecordAssemble().
bool IsAbortedTransactionBlockState | ( | void | ) |
Definition at line 406 of file xact.c.
References TransactionStateData::blockState, CurrentTransactionState, TBLOCK_ABORT, and TBLOCK_SUBABORT.
Referenced by BuildParamLogString(), exec_bind_message(), exec_describe_portal_message(), exec_describe_statement_message(), exec_execute_message(), exec_parse_message(), exec_replication_command(), exec_simple_query(), HandleFunctionRequest(), PostgresMain(), and ProcessRecoveryConflictInterrupt().
bool IsInParallelMode | ( | void | ) |
Definition at line 1088 of file xact.c.
References CurrentTransactionState, TransactionStateData::parallelChildXact, and TransactionStateData::parallelModeLevel.
Referenced by AssignTransactionId(), CheckTargetForConflictsIn(), CommandCounterIncrement(), CreateParallelContext(), CreatePredicateLock(), DefineSavepoint(), DeleteChildTargetLocks(), ExecSetVariableStmt(), GetLatestSnapshot(), GetNewTransactionId(), GetSerializableTransactionSnapshotInt(), GetTransactionSnapshot(), heap_delete(), heap_update(), heap_vacuum_rel(), PrepareTransaction(), PreventCommandIfParallelMode(), RelationCreateStorage(), RelationMapUpdateMap(), ReleaseOneSerializableXact(), ReleasePredicateLocks(), ReleaseSavepoint(), RemoveReindexPending(), RollbackToSavepoint(), set_config_with_handle(), SetReindexPending(), standard_ExecutorStart(), standard_ProcessUtility(), systable_inplace_update_begin(), and UpdateActiveSnapshotCommandId().
Definition at line 3759 of file xact.c.
References TransactionStateData::blockState, CurrentTransactionState, IsSubTransaction(), IsTransactionBlock(), MyXactFlags, TBLOCK_DEFAULT, TBLOCK_STARTED, and XACT_FLAGS_PIPELINING.
Referenced by vacuum().
bool IsSubTransaction | ( | void | ) |
Definition at line 5037 of file xact.c.
References CurrentTransactionState, and TransactionStateData::nestingLevel.
Referenced by _SPI_commit(), _SPI_execute_plan(), _SPI_rollback(), AfterTriggerSetState(), check_transaction_deferrable(), check_transaction_isolation(), check_transaction_read_only(), CheckTargetForConflictsIn(), CheckTransactionBlock(), CreateReplicationSlot(), ExportSnapshot(), ImportSnapshot(), IsInTransactionBlock(), IsSubxactTopXidLogPending(), PreventInTransactionBlock(), ProcessRecoveryConflictInterrupt(), and SPI_inside_nonatomic_context().
bool IsSubxactTopXidLogPending | ( | void | ) |
Definition at line 558 of file xact.c.
References CurrentTransactionState, GetCurrentTransactionIdIfAny(), IsSubTransaction(), IsTransactionState(), TransactionStateData::topXidLogged, TransactionIdIsValid, and XLogLogicalInfoActive.
Referenced by MarkSubxactTopXidLogged(), and XLogRecordAssemble().
bool IsTransactionBlock | ( | void | ) |
Definition at line 4964 of file xact.c.
References TransactionStateData::blockState, CurrentTransactionState, TBLOCK_DEFAULT, and TBLOCK_STARTED.
Referenced by apply_handle_commit_internal(), apply_handle_prepare_internal(), CheckTransactionBlock(), CreateReplicationSlot(), IsInTransactionBlock(), pa_start_subtrans(), pa_stream_abort(), PreventInTransactionBlock(), and standard_ProcessUtility().
bool IsTransactionOrTransactionBlock | ( | void | ) |
Definition at line 4982 of file xact.c.
References TransactionStateData::blockState, CurrentTransactionState, and TBLOCK_DEFAULT.
Referenced by apply_handle_stream_stop(), pgstat_report_stat(), PostgresMain(), ProcessCatchupInterrupt(), ProcessInterrupts(), ProcessNotifyInterrupt(), ProcessRecoveryConflictInterrupt(), ReorderBufferImmediateInvalidation(), ReorderBufferProcessTXN(), SnapBuildExportSnapshot(), StartupDecodingContext(), and WalSndErrorCleanup().
bool IsTransactionState | ( | void | ) |
Definition at line 386 of file xact.c.
References CurrentTransactionState, TransactionStateData::state, and TRANS_INPROGRESS.
Referenced by apply_handle_commit_internal(), apply_handle_origin(), assign_transaction_timeout(), begin_replication_step(), check_client_encoding(), check_default_table_access_method(), check_default_tablespace(), check_default_text_search_config(), check_role(), check_session_authorization(), check_temp_tablespaces(), check_transaction_isolation(), check_transaction_read_only(), clear_subscription_skip_lsn(), CreateInitDecodingContext(), ensure_last_message(), FetchTableStates(), InitializeClientEncoding(), IsSubxactTopXidLogPending(), LogicalRepApplyLoop(), LogLogicalMessage(), maybe_reread_subscription(), pa_send_data(), pa_start_subtrans(), pg_attribute_noreturn(), pg_do_encoding_conversion(), PrepareClientEncoding(), PrepareTempTablespaces(), process_syncing_tables_for_apply(), process_syncing_tables_for_sync(), RelationClearRelation(), RelationFlushRelation(), RelationIdGetRelation(), RelationInitPhysicalAddr(), RelationReloadNailed(), replorigin_create(), replorigin_drop_by_name(), SearchCatCacheInternal(), SetMultiXactIdLimit(), SetTransactionIdLimit(), SnapBuildClearExportedSnapshot(), SocketBackend(), stream_stop_internal(), synchronize_slots(), and validate_remote_info().
void MarkCurrentTransactionIdLoggedIfAny | ( | void | ) |
Definition at line 540 of file xact.c.
References CurrentTransactionState, TransactionStateData::didLogXid, TransactionStateData::fullTransactionId, and FullTransactionIdIsValid.
Referenced by XLogInsertRecord().
void MarkSubxactTopXidLogged | ( | void | ) |
Definition at line 590 of file xact.c.
References Assert, CurrentTransactionState, IsSubxactTopXidLogPending(), and TransactionStateData::topXidLogged.
Referenced by XLogInsertRecord().
|
static |
Definition at line 5465 of file xact.c.
References CurrentResourceOwner, CurrentTransactionState, TransactionStateData::curTransactionContext, CurTransactionContext, TransactionStateData::curTransactionOwner, CurTransactionResourceOwner, elog, FATAL, MemoryContextSwitchTo(), TransactionStateData::name, TransactionStateData::parent, pfree(), TransactionStateData::state, TRANS_DEFAULT, TransStateAsString(), and WARNING.
Referenced by CleanupSubTransaction(), and CommitSubTransaction().
|
static |
Definition at line 2499 of file xact.c.
References AfterTriggerEndXact(), AfterTriggerFireDeferred(), Assert, AtCommit_Memory(), AtEOXact_ApplyLauncher(), AtEOXact_Buffers(), AtEOXact_ComboCid(), AtEOXact_Enum(), AtEOXact_Files(), AtEOXact_GUC(), AtEOXact_HashTables(), AtEOXact_LargeObject(), AtEOXact_LogicalRepWorkers(), AtEOXact_Namespace(), AtEOXact_on_commit_actions(), AtEOXact_RelationCache(), AtEOXact_SMgr(), AtEOXact_Snapshot(), AtEOXact_SPI(), AtPrepare_Locks(), AtPrepare_MultiXact(), AtPrepare_Notify(), AtPrepare_PgStat(), AtPrepare_PredicateLocks(), AtPrepare_RelationMap(), CallXactCallbacks(), TransactionStateData::childXids, CurrentResourceOwner, CurrentTransactionState, TransactionStateData::curTransactionOwner, CurTransactionResourceOwner, disable_timeout(), elog, EndPrepare(), ereport, errcode(), errmsg(), ERROR, TransactionStateData::fullTransactionId, GetCurrentTimestamp(), GetCurrentTransactionId(), GetUserId(), TransactionStateData::gucNestLevel, HOLD_INTERRUPTS, InvalidFullTransactionId, InvalidSubTransactionId, IsInParallelMode(), MarkAsPreparing(), TransactionStateData::maxChildXids, MyDatabaseId, MyProc, MyXactFlags, TransactionStateData::nChildXids, TransactionStateData::nestingLevel, nParallelCurrentXids, TransactionStateData::parent, pgstat_report_xact_timestamp(), PostPrepare_Inval(), PostPrepare_Locks(), PostPrepare_MultiXact(), PostPrepare_PgStat(), PostPrepare_PredicateLocks(), PostPrepare_smgr(), PostPrepare_Twophase(), PreCommit_CheckForSerializationFailure(), PreCommit_on_commit_actions(), PreCommit_Portals(), prepareGID, ProcArrayClearTransaction(), RESOURCE_RELEASE_AFTER_LOCKS, RESOURCE_RELEASE_BEFORE_LOCKS, RESOURCE_RELEASE_LOCKS, ResourceOwnerDelete(), ResourceOwnerRelease(), RESUME_INTERRUPTS, ShowTransactionState(), smgrDoPendingSyncs(), StartPrepare(), TransactionStateData::state, TransactionStateData::subTransactionId, TopTransactionResourceOwner, TRANS_DEFAULT, TRANS_INPROGRESS, TRANS_PREPARE, TRANSACTION_TIMEOUT, TransactionTimeout, TransStateAsString(), WARNING, XACT_EVENT_PRE_PREPARE, XACT_EVENT_PREPARE, XACT_FLAGS_ACCESSEDTEMPNAMESPACE, XactHasExportedSnapshots(), XactLastRecEnd, and XactTopFullTransactionId.
Referenced by CommitTransactionCommandInternal().
bool PrepareTransactionBlock | ( | const char * | gid | ) |
Definition at line 3985 of file xact.c.
References Assert, TransactionStateData::blockState, CurrentTransactionState, EndTransactionBlock(), MemoryContextStrdup(), TransactionStateData::parent, prepareGID, TBLOCK_END, TBLOCK_IMPLICIT_INPROGRESS, TBLOCK_PREPARE, TBLOCK_STARTED, and TopTransactionContext.
Referenced by apply_handle_prepare_internal(), and standard_ProcessUtility().
void PreventInTransactionBlock | ( | bool | isTopLevel, |
const char * | stmtType | ||
) |
Definition at line 3628 of file xact.c.
References TransactionStateData::blockState, CurrentTransactionState, elog, ereport, errcode(), errmsg(), ERROR, FATAL, IsSubTransaction(), IsTransactionBlock(), MyXactFlags, TBLOCK_DEFAULT, TBLOCK_STARTED, XACT_FLAGS_NEEDIMMEDIATECOMMIT, and XACT_FLAGS_PIPELINING.
Referenced by AlterDatabase(), AlterSubscription(), CheckAlterSubOption(), cluster(), CreateSubscription(), DiscardAll(), DropSubscription(), exec_replication_command(), ExecDropStmt(), ExecReindex(), ProcessUtilitySlow(), ReindexPartitions(), standard_ProcessUtility(), and vacuum().
|
static |
Definition at line 5403 of file xact.c.
References TransactionStateData::blockState, currentSubTransactionId, CurrentTransactionState, ereport, errcode(), errmsg(), ERROR, TransactionStateData::fullTransactionId, GetUserIdAndSecContext(), TransactionStateData::gucNestLevel, InvalidFullTransactionId, InvalidSubTransactionId, MemoryContextAllocZero(), TransactionStateData::nestingLevel, NewGUCNestLevel(), TransactionStateData::parallelChildXact, TransactionStateData::parallelModeLevel, TransactionStateData::parent, pfree(), TransactionStateData::prevSecContext, TransactionStateData::prevUser, TransactionStateData::prevXactReadOnly, TransactionStateData::savepointLevel, TransactionStateData::startedInRecovery, TransactionStateData::state, TransactionStateData::subTransactionId, TBLOCK_SUBBEGIN, TopTransactionContext, TransactionStateData::topXidLogged, TRANS_DEFAULT, and XactReadOnly.
Referenced by BeginInternalSubTransaction(), and DefineSavepoint().
|
static |
Definition at line 1743 of file xact.c.
References DoNotReplicateId, elog, END_CRIT_SECTION, GetCurrentTimestamp(), GetCurrentTransactionIdIfAny(), GetCurrentTransactionStopTimestamp(), InvalidRepOriginId, InvalidTransactionId, MyXactFlags, PANIC, pfree(), pgstat_get_transactional_drops(), replorigin_session_advance(), replorigin_session_origin, replorigin_session_origin_lsn, smgrGetPendingDeletes(), START_CRIT_SECTION, TransactionIdAbortTree(), TransactionIdDidCommit(), TransactionIdIsValid, TransactionIdLatest(), xactGetCommittedChildren(), XactLastRecEnd, XactLogAbortRecord(), XidCacheRemoveRunningXids(), and XLogSetAsyncXactLSN().
Referenced by AbortSubTransaction(), and AbortTransaction().
|
static |
Definition at line 1314 of file xact.c.
References Assert, cleanup(), DELAY_CHKPT_START, PGPROC::delayChkptFlags, DoNotReplicateId, elog, END_CRIT_SECTION, ERROR, forceSyncCommit, GetCurrentTransactionStopTimestamp(), GetTopTransactionIdIfAny(), InvalidRepOriginId, InvalidTransactionId, LogLogicalInvalidations(), LogStandbyInvalidations(), MyProc, MyXactFlags, pfree(), pgstat_get_transactional_drops(), replorigin_session_advance(), replorigin_session_origin, replorigin_session_origin_lsn, replorigin_session_origin_timestamp, smgrGetPendingDeletes(), START_CRIT_SECTION, synchronous_commit, SYNCHRONOUS_COMMIT_OFF, SyncRepWaitForLSN(), TransactionIdAsyncCommitTree(), TransactionIdCommitTree(), TransactionIdIsValid, TransactionIdLatest(), TransactionTreeSetCommitTsData(), xactGetCommittedChildren(), xactGetCommittedInvalidationMessages(), XactLastCommitEnd, XactLastRecEnd, XactLogCommitRecord(), XLogFlush(), XLogLogicalInfoActive, XLogSetAsyncXactLSN(), and XLogStandbyInfoActive.
Referenced by CommitTransaction().
void RegisterSubXactCallback | ( | SubXactCallback | callback, |
void * | arg | ||
) |
Definition at line 3857 of file xact.c.
References SubXactCallbackItem::arg, arg, SubXactCallbackItem::callback, callback(), MemoryContextAlloc(), SubXactCallbackItem::next, SubXact_callbacks, and TopMemoryContext.
Referenced by _PG_init(), GetConnection(), and sepgsql_init_client_label().
void RegisterXactCallback | ( | XactCallback | callback, |
void * | arg | ||
) |
Definition at line 3797 of file xact.c.
References XactCallbackItem::arg, arg, XactCallbackItem::callback, callback(), MemoryContextAlloc(), XactCallbackItem::next, TopMemoryContext, and Xact_callbacks.
Referenced by _PG_init(), GetConnection(), and sepgsql_init_client_label().
void ReleaseCurrentSubTransaction | ( | void | ) |
Definition at line 4761 of file xact.c.
References Assert, TransactionStateData::blockState, BlockStateAsString(), CommitSubTransaction(), CurrentTransactionState, CurTransactionContext, elog, ERROR, MemoryContextSwitchTo(), TransactionStateData::state, TBLOCK_SUBINPROGRESS, and TRANS_INPROGRESS.
Referenced by exec_stmt_block(), plperl_spi_exec(), plperl_spi_exec_prepared(), plperl_spi_fetchrow(), plperl_spi_prepare(), plperl_spi_query(), plperl_spi_query_prepared(), pltcl_subtrans_commit(), pltcl_subtransaction(), PLy_spi_subtransaction_commit(), and PLy_subtransaction_exit().
void ReleaseSavepoint | ( | const char * | name | ) |
Definition at line 4451 of file xact.c.
References Assert, TransactionStateData::blockState, BlockStateAsString(), CurrentTransactionState, elog, ereport, errcode(), errmsg(), ERROR, FATAL, IsInParallelMode(), IsParallelWorker, TransactionStateData::name, name, TransactionStateData::parent, PointerIsValid, TransactionStateData::savepointLevel, TBLOCK_ABORT, TBLOCK_ABORT_END, TBLOCK_ABORT_PENDING, TBLOCK_BEGIN, TBLOCK_DEFAULT, TBLOCK_END, TBLOCK_IMPLICIT_INPROGRESS, TBLOCK_INPROGRESS, TBLOCK_PARALLEL_INPROGRESS, TBLOCK_PREPARE, TBLOCK_STARTED, TBLOCK_SUBABORT, TBLOCK_SUBABORT_END, TBLOCK_SUBABORT_PENDING, TBLOCK_SUBABORT_RESTART, TBLOCK_SUBBEGIN, TBLOCK_SUBCOMMIT, TBLOCK_SUBINPROGRESS, TBLOCK_SUBRELEASE, and TBLOCK_SUBRESTART.
Referenced by standard_ProcessUtility().
void RequireTransactionBlock | ( | bool | isTopLevel, |
const char * | stmtType | ||
) |
Definition at line 3706 of file xact.c.
References CheckTransactionBlock().
Referenced by PerformCursorOpen(), and standard_ProcessUtility().
void RestoreTransactionCharacteristics | ( | const SavedTransactionCharacteristics * | s | ) |
Definition at line 3124 of file xact.c.
References SavedTransactionCharacteristics::save_XactDeferrable, SavedTransactionCharacteristics::save_XactIsoLevel, SavedTransactionCharacteristics::save_XactReadOnly, XactDeferrable, XactIsoLevel, and XactReadOnly.
Referenced by _SPI_commit(), _SPI_rollback(), and CommitTransactionCommandInternal().
void RollbackAndReleaseCurrentSubTransaction | ( | void | ) |
Definition at line 4789 of file xact.c.
References AbortSubTransaction(), Assert, TransactionStateData::blockState, BlockStateAsString(), CleanupSubTransaction(), CurrentTransactionState, elog, FATAL, TBLOCK_ABORT, TBLOCK_ABORT_END, TBLOCK_ABORT_PENDING, TBLOCK_BEGIN, TBLOCK_DEFAULT, TBLOCK_END, TBLOCK_IMPLICIT_INPROGRESS, TBLOCK_INPROGRESS, TBLOCK_PARALLEL_INPROGRESS, TBLOCK_PREPARE, TBLOCK_STARTED, TBLOCK_SUBABORT, TBLOCK_SUBABORT_END, TBLOCK_SUBABORT_PENDING, TBLOCK_SUBABORT_RESTART, TBLOCK_SUBBEGIN, TBLOCK_SUBCOMMIT, TBLOCK_SUBINPROGRESS, TBLOCK_SUBRELEASE, and TBLOCK_SUBRESTART.
Referenced by exec_stmt_block(), plperl_spi_exec(), plperl_spi_exec_prepared(), plperl_spi_fetchrow(), plperl_spi_prepare(), plperl_spi_query(), plperl_spi_query_prepared(), pltcl_subtrans_abort(), pltcl_subtransaction(), PLy_abort_open_subtransactions(), PLy_spi_subtransaction_abort(), PLy_subtransaction_exit(), ReorderBufferImmediateInvalidation(), and ReorderBufferProcessTXN().
void RollbackToSavepoint | ( | const char * | name | ) |
Definition at line 4560 of file xact.c.
References Assert, TransactionStateData::blockState, BlockStateAsString(), CurrentTransactionState, elog, ereport, errcode(), errmsg(), ERROR, FATAL, IsInParallelMode(), IsParallelWorker, TransactionStateData::name, name, TransactionStateData::parent, PointerIsValid, TransactionStateData::savepointLevel, TBLOCK_ABORT, TBLOCK_ABORT_END, TBLOCK_ABORT_PENDING, TBLOCK_BEGIN, TBLOCK_DEFAULT, TBLOCK_END, TBLOCK_IMPLICIT_INPROGRESS, TBLOCK_INPROGRESS, TBLOCK_PARALLEL_INPROGRESS, TBLOCK_PREPARE, TBLOCK_STARTED, TBLOCK_SUBABORT, TBLOCK_SUBABORT_END, TBLOCK_SUBABORT_PENDING, TBLOCK_SUBABORT_RESTART, TBLOCK_SUBBEGIN, TBLOCK_SUBCOMMIT, TBLOCK_SUBINPROGRESS, TBLOCK_SUBRELEASE, and TBLOCK_SUBRESTART.
Referenced by pa_stream_abort(), and standard_ProcessUtility().
void SaveTransactionCharacteristics | ( | SavedTransactionCharacteristics * | s | ) |
Definition at line 3116 of file xact.c.
References SavedTransactionCharacteristics::save_XactDeferrable, SavedTransactionCharacteristics::save_XactIsoLevel, SavedTransactionCharacteristics::save_XactReadOnly, XactDeferrable, XactIsoLevel, and XactReadOnly.
Referenced by _SPI_commit(), _SPI_rollback(), and CommitTransactionCommandInternal().
void SerializeTransactionState | ( | Size | maxsize, |
char * | start_address | ||
) |
Definition at line 5527 of file xact.c.
References add_size(), Assert, TransactionStateData::childXids, SerializedTransactionState::currentCommandId, currentCommandId, SerializedTransactionState::currentFullTransactionId, CurrentTransactionState, TransactionStateData::fullTransactionId, FullTransactionIdIsValid, i, TransactionStateData::nChildXids, nParallelCurrentXids, SerializedTransactionState::nParallelCurrentXids, palloc(), ParallelCurrentXids, SerializedTransactionState::parallelCurrentXids, TransactionStateData::parent, qsort, SerializedTransactionStateHeaderSize, SerializedTransactionState::topFullTransactionId, XactDeferrable, SerializedTransactionState::xactDeferrable, XactIsoLevel, SerializedTransactionState::xactIsoLevel, XactTopFullTransactionId, xidComparator(), and XidFromFullTransactionId.
Referenced by InitializeParallelDSM().
void SetCurrentStatementStartTimestamp | ( | void | ) |
Definition at line 913 of file xact.c.
References Assert, GetCurrentTimestamp(), IsParallelWorker, and stmtStartTimestamp.
Referenced by autovac_report_activity(), autovac_report_workitem(), begin_replication_step(), initialize_worker_spi(), InitPostgres(), PostgresMain(), and worker_spi_main().
void SetParallelStartTimestamps | ( | TimestampTz | xact_ts, |
TimestampTz | stmt_ts | ||
) |
Definition at line 858 of file xact.c.
References Assert, IsParallelWorker, stmtStartTimestamp, and xactStartTimestamp.
Referenced by ParallelWorkerMain().
|
static |
Definition at line 5635 of file xact.c.
References CurrentTransactionState, DEBUG5, message_level_is_interesting(), ShowTransactionStateRec(), and str.
Referenced by AbortSubTransaction(), CleanupSubTransaction(), CommitSubTransaction(), CommitTransaction(), PrepareTransaction(), StartSubTransaction(), and StartTransaction().
|
static |
Definition at line 5647 of file xact.c.
References appendStringInfo(), TransactionStateData::blockState, BlockStateAsString(), buf, TransactionStateData::childXids, currentCommandId, currentCommandIdUsed, DEBUG5, ereport, errmsg_internal(), TransactionStateData::fullTransactionId, i, initStringInfo(), TransactionStateData::name, TransactionStateData::nChildXids, TransactionStateData::nestingLevel, TransactionStateData::parent, pfree(), PointerIsValid, stack_is_too_deep(), TransactionStateData::state, str, TransactionStateData::subTransactionId, TransStateAsString(), and XidFromFullTransactionId.
Referenced by ShowTransactionState().
void StartParallelWorkerTransaction | ( | char * | tstatespace | ) |
Definition at line 5598 of file xact.c.
References Assert, TransactionStateData::blockState, SerializedTransactionState::currentCommandId, currentCommandId, SerializedTransactionState::currentFullTransactionId, CurrentTransactionState, TransactionStateData::fullTransactionId, nParallelCurrentXids, SerializedTransactionState::nParallelCurrentXids, ParallelCurrentXids, SerializedTransactionState::parallelCurrentXids, StartTransaction(), TBLOCK_DEFAULT, TBLOCK_PARALLEL_INPROGRESS, SerializedTransactionState::topFullTransactionId, XactDeferrable, SerializedTransactionState::xactDeferrable, XactIsoLevel, SerializedTransactionState::xactIsoLevel, and XactTopFullTransactionId.
Referenced by ParallelWorkerMain().
|
static |
Definition at line 5060 of file xact.c.
References AfterTriggerBeginSubXact(), AtSubStart_Memory(), AtSubStart_ResourceOwner(), CallSubXactCallbacks(), CurrentTransactionState, elog, TransactionStateData::parent, ShowTransactionState(), TransactionStateData::state, TransactionStateData::subTransactionId, SUBXACT_EVENT_START_SUB, TRANS_DEFAULT, TRANS_INPROGRESS, TRANS_START, TransStateAsString(), and WARNING.
Referenced by CommitTransactionCommandInternal().
|
static |
Definition at line 2053 of file xact.c.
References AfterTriggerBeginXact(), Assert, AtStart_Cache(), AtStart_GUC(), AtStart_Memory(), AtStart_ResourceOwner(), TransactionStateData::childXids, currentCommandId, currentCommandIdUsed, currentSubTransactionId, CurrentTransactionState, DefaultXactDeferrable, DefaultXactIsoLevel, DefaultXactReadOnly, TransactionStateData::didLogXid, enable_timeout_after(), FirstCommandId, forceSyncCommit, TransactionStateData::fullTransactionId, FullTransactionIdIsValid, GetCurrentTimestamp(), GetNextLocalTransactionId(), GetUserIdAndSecContext(), TransactionStateData::gucNestLevel, InvalidFullTransactionId, IsParallelWorker, VirtualTransactionId::localTransactionId, log_xact_sample_rate, PGPROC::lxid, TransactionStateData::maxChildXids, MyProc, MyProcNumber, MyXactFlags, TransactionStateData::nChildXids, TransactionStateData::nestingLevel, nUnreportedXids, pg_global_prng_state, pg_prng_double(), pgstat_report_xact_timestamp(), TransactionStateData::prevSecContext, TransactionStateData::prevUser, VirtualTransactionId::procNumber, PGPROC::procNumber, RecoveryInProgress(), ShowTransactionState(), SPI_inside_nonatomic_context(), TransactionStateData::startedInRecovery, TransactionStateData::state, stmtStartTimestamp, TransactionStateData::subTransactionId, TopSubTransactionId, TopTransactionStateData, TRANS_DEFAULT, TRANS_INPROGRESS, TRANS_START, TRANSACTION_TIMEOUT, TransactionTimeout, VirtualXactLockTableInsert(), PGPROC::vxid, xact_is_sampled, XactDeferrable, XactIsoLevel, XactReadOnly, xactStartTimestamp, xactStopTimestamp, and XactTopFullTransactionId.
Referenced by _doSetFixedOutputState(), CommitTransactionCommandInternal(), restore_toc_entry(), RestoreArchive(), StartParallelWorkerTransaction(), StartRestoreLOs(), and StartTransactionCommand().
void StartTransactionCommand | ( | void | ) |
Definition at line 3039 of file xact.c.
References Assert, TransactionStateData::blockState, BlockStateAsString(), CurrentTransactionState, CurTransactionContext, elog, ERROR, MemoryContextSwitchTo(), StartTransaction(), TBLOCK_ABORT, TBLOCK_ABORT_END, TBLOCK_ABORT_PENDING, TBLOCK_BEGIN, TBLOCK_DEFAULT, TBLOCK_END, TBLOCK_IMPLICIT_INPROGRESS, TBLOCK_INPROGRESS, TBLOCK_PARALLEL_INPROGRESS, TBLOCK_PREPARE, TBLOCK_STARTED, TBLOCK_SUBABORT, TBLOCK_SUBABORT_END, TBLOCK_SUBABORT_PENDING, TBLOCK_SUBABORT_RESTART, TBLOCK_SUBBEGIN, TBLOCK_SUBCOMMIT, TBLOCK_SUBINPROGRESS, TBLOCK_SUBRELEASE, and TBLOCK_SUBRESTART.
Referenced by _SPI_commit(), _SPI_rollback(), apply_handle_commit_internal(), ATExecDetachPartition(), autoprewarm_database_main(), bbsink_server_new(), begin_replication_step(), BeginInternalSubTransaction(), BootstrapModeMain(), clear_subscription_skip_lsn(), cluster(), cluster_multiple_rels(), DefineIndex(), DisableSubscriptionAndExit(), do_autovacuum(), EventTriggerOnLogin(), exec_replication_command(), FetchTableStates(), get_database_list(), get_subscription_list(), IdentifySystem(), index_drop(), initialize_worker_spi(), InitializeLogRepWorker(), InitPostgres(), LogicalRepSyncTableStart(), maybe_reread_subscription(), movedb(), pa_start_subtrans(), ParallelApplyWorkerMain(), ParallelWorkerMain(), perform_work_item(), pg_attribute_noreturn(), process_syncing_tables_for_apply(), process_syncing_tables_for_sync(), ProcessCatchupInterrupt(), ProcessIncomingNotify(), ReindexMultipleInternal(), ReindexRelationConcurrently(), RemoveTempRelationsCallback(), ReorderBufferProcessTXN(), run_apply_worker(), shell_check_detail(), SnapBuildExportSnapshot(), start_xact_command(), synchronize_slots(), vacuum(), vacuum_rel(), validate_remote_info(), and worker_spi_main().
bool SubTransactionIsActive | ( | SubTransactionId | subxid | ) |
Definition at line 804 of file xact.c.
References CurrentTransactionState, TransactionStateData::parent, TransactionStateData::state, TransactionStateData::subTransactionId, and TRANS_ABORT.
Referenced by fmgr_sql().
char TransactionBlockStatusCode | ( | void | ) |
Definition at line 4996 of file xact.c.
References TransactionStateData::blockState, BlockStateAsString(), CurrentTransactionState, elog, FATAL, TBLOCK_ABORT, TBLOCK_ABORT_END, TBLOCK_ABORT_PENDING, TBLOCK_BEGIN, TBLOCK_DEFAULT, TBLOCK_END, TBLOCK_IMPLICIT_INPROGRESS, TBLOCK_INPROGRESS, TBLOCK_PARALLEL_INPROGRESS, TBLOCK_PREPARE, TBLOCK_STARTED, TBLOCK_SUBABORT, TBLOCK_SUBABORT_END, TBLOCK_SUBABORT_PENDING, TBLOCK_SUBABORT_RESTART, TBLOCK_SUBBEGIN, TBLOCK_SUBCOMMIT, TBLOCK_SUBINPROGRESS, TBLOCK_SUBRELEASE, and TBLOCK_SUBRESTART.
Referenced by ReadyForQuery().
bool TransactionIdIsCurrentTransactionId | ( | TransactionId | xid | ) |
Definition at line 940 of file xact.c.
References TransactionStateData::childXids, CurrentTransactionState, TransactionStateData::fullTransactionId, FullTransactionIdIsValid, GetTopTransactionIdIfAny(), TransactionStateData::nChildXids, nParallelCurrentXids, ParallelCurrentXids, TransactionStateData::parent, TransactionStateData::state, TRANS_ABORT, TransactionIdEquals, TransactionIdIsNormal, TransactionIdPrecedes(), and XidFromFullTransactionId.
Referenced by compute_new_xmax_infomask(), Do_MultiXactIdWait(), DoesMultiXactIdConflict(), ExecCheckTupleVisible(), ExecMergeMatched(), ExecOnConflictUpdate(), FreezeMultiXactId(), heap_delete(), heap_inplace_lock(), heap_lock_tuple(), heap_update(), heapam_index_build_range_scan(), heapam_relation_copy_for_cluster(), heapam_scan_analyze_next_tuple(), heapam_tuple_lock(), HeapTupleHeaderAdjustCmax(), HeapTupleHeaderGetCmax(), HeapTupleHeaderGetCmin(), HeapTupleHeaderIsOnlyLocked(), HeapTupleSatisfiesDirty(), HeapTupleSatisfiesMVCC(), HeapTupleSatisfiesSelf(), HeapTupleSatisfiesToast(), HeapTupleSatisfiesUpdate(), HeapTupleSatisfiesVacuumHorizon(), MultiXactIdIsRunning(), PredicateLockTID(), SnapBuildWaitSnapshot(), test_lockmode_for_conflict(), TransactionIdIsInProgress(), tts_buffer_is_current_xact_tuple(), and tts_heap_is_current_xact_tuple().
bool TransactionStartedDuringRecovery | ( | void | ) |
Definition at line 1041 of file xact.c.
References CurrentTransactionState, and TransactionStateData::startedInRecovery.
Referenced by RelationGetIndexScan().
|
static |
Definition at line 5747 of file xact.c.
References TRANS_ABORT, TRANS_COMMIT, TRANS_DEFAULT, TRANS_INPROGRESS, TRANS_PREPARE, and TRANS_START.
Referenced by AbortSubTransaction(), AbortTransaction(), CleanupSubTransaction(), CleanupTransaction(), CommitSubTransaction(), CommitTransaction(), PopTransaction(), PrepareTransaction(), ShowTransactionStateRec(), and StartSubTransaction().
void UnregisterSubXactCallback | ( | SubXactCallback | callback, |
void * | arg | ||
) |
Definition at line 3870 of file xact.c.
References SubXactCallbackItem::arg, arg, SubXactCallbackItem::callback, callback(), SubXactCallbackItem::next, pfree(), and SubXact_callbacks.
void UnregisterXactCallback | ( | XactCallback | callback, |
void * | arg | ||
) |
Definition at line 3810 of file xact.c.
References XactCallbackItem::arg, arg, XactCallbackItem::callback, callback(), XactCallbackItem::next, pfree(), and Xact_callbacks.
void UserAbortTransactionBlock | ( | bool | chain | ) |
Definition at line 4197 of file xact.c.
References Assert, TransactionStateData::blockState, BlockStateAsString(), TransactionStateData::chain, CurrentTransactionState, elog, ereport, errcode(), errmsg(), ERROR, FATAL, TransactionStateData::parent, TBLOCK_ABORT, TBLOCK_ABORT_END, TBLOCK_ABORT_PENDING, TBLOCK_BEGIN, TBLOCK_DEFAULT, TBLOCK_END, TBLOCK_IMPLICIT_INPROGRESS, TBLOCK_INPROGRESS, TBLOCK_PARALLEL_INPROGRESS, TBLOCK_PREPARE, TBLOCK_STARTED, TBLOCK_SUBABORT, TBLOCK_SUBABORT_END, TBLOCK_SUBABORT_PENDING, TBLOCK_SUBABORT_RESTART, TBLOCK_SUBBEGIN, TBLOCK_SUBCOMMIT, TBLOCK_SUBINPROGRESS, TBLOCK_SUBRELEASE, TBLOCK_SUBRESTART, and WARNING.
Referenced by standard_ProcessUtility().
void WarnNoTransactionBlock | ( | bool | isTopLevel, |
const char * | stmtType | ||
) |
Definition at line 3700 of file xact.c.
References CheckTransactionBlock().
Referenced by ExecSetVariableStmt(), and standard_ProcessUtility().
void xact_redo | ( | XLogReaderState * | record | ) |
Definition at line 6350 of file xact.c.
References Assert, elog, XLogReaderState::EndRecPtr, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), xl_xact_assignment::nsubxacts, PANIC, ParseAbortRecord(), ParseCommitRecord(), PrepareRedoAdd(), PrepareRedoRemove(), ProcArrayApplyXidAssignment(), XLogReaderState::ReadRecPtr, STANDBY_INITIALIZED, standbyState, xl_xact_parsed_commit::twophase_xid, xl_xact_parsed_abort::twophase_xid, xact_redo_abort(), xact_redo_commit(), XLOG_XACT_ABORT, XLOG_XACT_ABORT_PREPARED, XLOG_XACT_ASSIGNMENT, XLOG_XACT_COMMIT, XLOG_XACT_COMMIT_PREPARED, XLOG_XACT_INVALIDATIONS, XLOG_XACT_OPMASK, XLOG_XACT_PREPARE, XLogRecGetData, XLogRecGetInfo, XLogRecGetOrigin, XLogRecGetXid, XLogRecHasAnyBlockRefs, xl_xact_assignment::xsub, and xl_xact_assignment::xtop.
|
static |
Definition at line 6271 of file xact.c.
References AdvanceNextFullTransactionIdPastXid(), Assert, DropRelationFiles(), ExpireTreeKnownAssignedTransactionIds(), xl_xact_parsed_abort::nrels, xl_xact_parsed_abort::nstats, xl_xact_parsed_abort::nsubxacts, xl_xact_parsed_abort::origin_lsn, pgstat_execute_transactional_drops(), RecordKnownAssignedTransactionIds(), replorigin_advance(), STANDBY_DISABLED, StandbyReleaseLockTree(), standbyState, xl_xact_parsed_abort::stats, xl_xact_parsed_abort::subxacts, TransactionIdAbortTree(), TransactionIdIsValid, TransactionIdLatest(), XACT_XINFO_HAS_AE_LOCKS, XACT_XINFO_HAS_ORIGIN, xl_xact_parsed_abort::xinfo, xl_xact_parsed_abort::xlocators, and XLogFlush().
Referenced by xact_redo().
|
static |
Definition at line 6117 of file xact.c.
References AdvanceNextFullTransactionIdPastXid(), Assert, xl_xact_parsed_commit::dbId, DropRelationFiles(), ExpireTreeKnownAssignedTransactionIds(), InvalidRepOriginId, xl_xact_parsed_commit::msgs, xl_xact_parsed_commit::nmsgs, xl_xact_parsed_commit::nrels, xl_xact_parsed_commit::nstats, xl_xact_parsed_commit::nsubxacts, xl_xact_parsed_commit::origin_lsn, xl_xact_parsed_commit::origin_timestamp, pgstat_execute_transactional_drops(), ProcessCommittedInvalidationMessages(), RecordKnownAssignedTransactionIds(), replorigin_advance(), STANDBY_DISABLED, StandbyReleaseLockTree(), standbyState, xl_xact_parsed_commit::stats, xl_xact_parsed_commit::subxacts, TransactionIdAsyncCommitTree(), TransactionIdCommitTree(), TransactionIdIsValid, TransactionIdLatest(), TransactionTreeSetCommitTsData(), xl_xact_parsed_commit::tsId, xl_xact_parsed_commit::xact_time, XACT_XINFO_HAS_AE_LOCKS, XACT_XINFO_HAS_ORIGIN, XactCompletionApplyFeedback, XactCompletionForceSyncCommit, XactCompletionRelcacheInitFileInval, xl_xact_parsed_commit::xinfo, xl_xact_parsed_commit::xlocators, XLogFlush(), and XLogRequestWalReceiverReply().
Referenced by xact_redo().
int xactGetCommittedChildren | ( | TransactionId ** | ptr | ) |
Definition at line 5777 of file xact.c.
References TransactionStateData::childXids, CurrentTransactionState, and TransactionStateData::nChildXids.
Referenced by ExportSnapshot(), RecordTransactionAbort(), RecordTransactionCommit(), and StartPrepare().
XLogRecPtr XactLogAbortRecord | ( | TimestampTz | abort_time, |
int | nsubxacts, | ||
TransactionId * | subxacts, | ||
int | nrels, | ||
RelFileLocator * | rels, | ||
int | ndroppedstats, | ||
xl_xact_stats_item * | droppedstats, | ||
int | xactflags, | ||
TransactionId | twophase_xid, | ||
const char * | twophase_gid | ||
) |
Definition at line 5973 of file xact.c.
References Assert, CritSectionCount, xl_xact_dbinfo::dbId, InvalidRepOriginId, MinSizeOfXactAbort, MinSizeOfXactRelfileLocators, MinSizeOfXactStatsItems, MinSizeOfXactSubxacts, MyDatabaseId, MyDatabaseTableSpace, xl_xact_stats_items::nitems, xl_xact_relfilelocators::nrels, xl_xact_subxacts::nsubxacts, xl_xact_origin::origin_lsn, xl_xact_origin::origin_timestamp, replorigin_session_origin, replorigin_session_origin_lsn, replorigin_session_origin_timestamp, TransactionIdIsValid, xl_xact_dbinfo::tsId, XACT_FLAGS_ACQUIREDACCESSEXCLUSIVELOCK, xl_xact_abort::xact_time, XACT_XINFO_HAS_AE_LOCKS, XACT_XINFO_HAS_DBINFO, XACT_XINFO_HAS_DROPPED_STATS, XACT_XINFO_HAS_GID, XACT_XINFO_HAS_ORIGIN, XACT_XINFO_HAS_RELFILELOCATORS, XACT_XINFO_HAS_SUBXACTS, XACT_XINFO_HAS_TWOPHASE, xl_xact_twophase::xid, xl_xact_xinfo::xinfo, XLOG_INCLUDE_ORIGIN, XLOG_XACT_ABORT, XLOG_XACT_ABORT_PREPARED, XLOG_XACT_HAS_INFO, XLogBeginInsert(), XLogInsert(), XLogLogicalInfoActive, XLogRegisterData(), XLogSetRecordFlags(), and XLR_SPECIAL_REL_UPDATE.
Referenced by RecordTransactionAbort(), and RecordTransactionAbortPrepared().
XLogRecPtr XactLogCommitRecord | ( | TimestampTz | commit_time, |
int | nsubxacts, | ||
TransactionId * | subxacts, | ||
int | nrels, | ||
RelFileLocator * | rels, | ||
int | ndroppedstats, | ||
xl_xact_stats_item * | droppedstats, | ||
int | nmsgs, | ||
SharedInvalidationMessage * | msgs, | ||
bool | relcacheInval, | ||
int | xactflags, | ||
TransactionId | twophase_xid, | ||
const char * | twophase_gid | ||
) |
Definition at line 5801 of file xact.c.
References Assert, CritSectionCount, xl_xact_dbinfo::dbId, forceSyncCommit, InvalidRepOriginId, MinSizeOfXactInvals, MinSizeOfXactRelfileLocators, MinSizeOfXactStatsItems, MinSizeOfXactSubxacts, MyDatabaseId, MyDatabaseTableSpace, xl_xact_stats_items::nitems, xl_xact_invals::nmsgs, xl_xact_relfilelocators::nrels, xl_xact_subxacts::nsubxacts, xl_xact_origin::origin_lsn, xl_xact_origin::origin_timestamp, replorigin_session_origin, replorigin_session_origin_lsn, replorigin_session_origin_timestamp, synchronous_commit, SYNCHRONOUS_COMMIT_REMOTE_APPLY, TransactionIdIsValid, xl_xact_dbinfo::tsId, XACT_COMPLETION_APPLY_FEEDBACK, XACT_COMPLETION_FORCE_SYNC_COMMIT, XACT_COMPLETION_UPDATE_RELCACHE_FILE, XACT_FLAGS_ACQUIREDACCESSEXCLUSIVELOCK, xl_xact_commit::xact_time, XACT_XINFO_HAS_AE_LOCKS, XACT_XINFO_HAS_DBINFO, XACT_XINFO_HAS_DROPPED_STATS, XACT_XINFO_HAS_GID, XACT_XINFO_HAS_INVALS, XACT_XINFO_HAS_ORIGIN, XACT_XINFO_HAS_RELFILELOCATORS, XACT_XINFO_HAS_SUBXACTS, XACT_XINFO_HAS_TWOPHASE, xl_xact_twophase::xid, xl_xact_xinfo::xinfo, XLOG_INCLUDE_ORIGIN, XLOG_XACT_COMMIT, XLOG_XACT_COMMIT_PREPARED, XLOG_XACT_HAS_INFO, XLogBeginInsert(), XLogInsert(), XLogLogicalInfoActive, XLogRegisterData(), XLogSetRecordFlags(), and XLR_SPECIAL_REL_UPDATE.
Referenced by RecordTransactionCommit(), and RecordTransactionCommitPrepared().
Definition at line 99 of file xact.c.
Referenced by heap_getnext(), ResetLogicalStreamingState(), systable_beginscan(), systable_beginscan_ordered(), systable_endscan(), systable_endscan_ordered(), table_index_fetch_tuple(), table_scan_bitmap_next_block(), table_scan_bitmap_next_tuple(), table_scan_getnextslot(), table_scan_sample_next_block(), table_scan_sample_next_tuple(), table_tuple_fetch_row_version(), and table_tuple_get_latest_tid().
TransactionId CheckXidAlive = InvalidTransactionId |
Definition at line 98 of file xact.c.
Referenced by HandleConcurrentAbort(), heap_getnext(), ReorderBufferProcessTXN(), ReorderBufferStreamCommit(), ResetLogicalStreamingState(), SetupCheckXidLive(), systable_beginscan(), systable_beginscan_ordered(), systable_endscan(), systable_endscan_ordered(), table_index_fetch_tuple(), table_scan_bitmap_next_block(), table_scan_bitmap_next_tuple(), table_scan_getnextslot(), table_scan_sample_next_block(), table_scan_sample_next_tuple(), table_tuple_fetch_row_version(), and table_tuple_get_latest_tid().
|
static |
Definition at line 266 of file xact.c.
Referenced by CommandCounterIncrement(), GetCurrentCommandId(), SerializeTransactionState(), ShowTransactionStateRec(), StartParallelWorkerTransaction(), and StartTransaction().
|
static |
Definition at line 267 of file xact.c.
Referenced by CommandCounterIncrement(), GetCurrentCommandId(), ShowTransactionStateRec(), and StartTransaction().
|
static |
Definition at line 265 of file xact.c.
Referenced by PushTransaction(), and StartTransaction().
|
static |
Definition at line 259 of file xact.c.
Referenced by AbortCurrentTransactionInternal(), AbortOutOfAnyTransaction(), AbortSubTransaction(), AbortTransaction(), AtCleanup_Memory(), AtCommit_Memory(), AtStart_Memory(), AtStart_ResourceOwner(), AtSubAbort_childXids(), AtSubAbort_ResourceOwner(), AtSubCleanup_Memory(), AtSubCommit_childXids(), AtSubCommit_Memory(), AtSubStart_Memory(), AtSubStart_ResourceOwner(), BeginImplicitTransactionBlock(), BeginInternalSubTransaction(), BeginTransactionBlock(), CleanupSubTransaction(), CleanupTransaction(), CommitSubTransaction(), CommitTransaction(), CommitTransactionCommandInternal(), DefineSavepoint(), EndImplicitTransactionBlock(), EndParallelWorkerTransaction(), EndTransactionBlock(), EnterParallelMode(), EstimateTransactionStateSpace(), ExitParallelMode(), GetCurrentFullTransactionId(), GetCurrentFullTransactionIdIfAny(), GetCurrentSubTransactionId(), GetCurrentTransactionId(), GetCurrentTransactionIdIfAny(), GetCurrentTransactionNestLevel(), GetCurrentTransactionStopTimestamp(), IsAbortedTransactionBlockState(), IsInParallelMode(), IsInTransactionBlock(), IsSubTransaction(), IsSubxactTopXidLogPending(), IsTransactionBlock(), IsTransactionOrTransactionBlock(), IsTransactionState(), MarkCurrentTransactionIdLoggedIfAny(), MarkSubxactTopXidLogged(), PopTransaction(), PrepareTransaction(), PrepareTransactionBlock(), PreventInTransactionBlock(), PushTransaction(), ReleaseCurrentSubTransaction(), ReleaseSavepoint(), RollbackAndReleaseCurrentSubTransaction(), RollbackToSavepoint(), SerializeTransactionState(), ShowTransactionState(), StartParallelWorkerTransaction(), StartSubTransaction(), StartTransaction(), StartTransactionCommand(), SubTransactionIsActive(), TransactionBlockStatusCode(), TransactionIdIsCurrentTransactionId(), TransactionStartedDuringRecovery(), UserAbortTransactionBlock(), and xactGetCommittedChildren().
Definition at line 83 of file xact.c.
Referenced by StartTransaction().
int DefaultXactIsoLevel = XACT_READ_COMMITTED |
Definition at line 77 of file xact.c.
Referenced by StartTransaction().
Definition at line 80 of file xact.c.
Referenced by StartTransaction().
Definition at line 292 of file xact.c.
Referenced by ForceSyncCommit(), RecordTransactionCommit(), StartTransaction(), and XactLogCommitRecord().
int MyXactFlags |
Definition at line 135 of file xact.c.
Referenced by AccessTempTableNamespace(), CreateExtensionInternal(), exec_execute_message(), exec_simple_query(), IsInTransactionBlock(), LogAccessExclusiveLock(), PreCommit_on_commit_actions(), PrepareTransaction(), PreventInTransactionBlock(), RangeVarCallbackForLockTable(), RecordTransactionAbort(), RecordTransactionAbortPrepared(), RecordTransactionCommit(), RecordTransactionCommitPrepared(), relation_open(), RemoveObjects(), StartTransaction(), and try_relation_open().
|
static |
Definition at line 125 of file xact.c.
Referenced by CleanupTransaction(), CommitTransaction(), PrepareTransaction(), SerializeTransactionState(), StartParallelWorkerTransaction(), and TransactionIdIsCurrentTransactionId().
|
static |
Definition at line 256 of file xact.c.
Referenced by AssignTransactionId(), and StartTransaction().
|
static |
Definition at line 126 of file xact.c.
Referenced by SerializeTransactionState(), StartParallelWorkerTransaction(), and TransactionIdIsCurrentTransactionId().
|
static |
Definition at line 287 of file xact.c.
Referenced by PrepareTransaction(), and PrepareTransactionBlock().
|
static |
Definition at line 280 of file xact.c.
Referenced by GetCurrentStatementStartTimestamp(), SetCurrentStatementStartTimestamp(), SetParallelStartTimestamps(), and StartTransaction().
|
static |
Definition at line 326 of file xact.c.
Referenced by CallSubXactCallbacks(), RegisterSubXactCallback(), and UnregisterSubXactCallback().
int synchronous_commit = SYNCHRONOUS_COMMIT_ON |
Definition at line 86 of file xact.c.
Referenced by AutoVacWorkerMain(), RecordTransactionCommit(), and XactLogCommitRecord().
|
static |
Definition at line 246 of file xact.c.
Referenced by AssignTransactionId(), GetTopFullTransactionId(), GetTopTransactionId(), and StartTransaction().
|
static |
Definition at line 302 of file xact.c.
Referenced by AtAbort_Memory(), AtCleanup_Memory(), AtStart_Memory(), AtSubAbort_Memory(), and AtSubCleanup_Memory().
|
static |
Definition at line 257 of file xact.c.
Referenced by AssignTransactionId().
|
static |
Definition at line 314 of file xact.c.
Referenced by CallXactCallbacks(), RegisterXactCallback(), and UnregisterXactCallback().
Definition at line 295 of file xact.c.
Referenced by check_log_duration(), and StartTransaction().
bool XactDeferrable |
Definition at line 84 of file xact.c.
Referenced by GetSafeSnapshot(), GetSerializableTransactionSnapshot(), RestoreTransactionCharacteristics(), SaveTransactionCharacteristics(), SerializeTransactionState(), SetSerializableTransactionSnapshot(), StartParallelWorkerTransaction(), and StartTransaction().
int XactIsoLevel = XACT_READ_COMMITTED |
Definition at line 78 of file xact.c.
Referenced by check_transaction_isolation(), CreateReplicationSlot(), ExportSnapshot(), InitPostgres(), RestoreTransactionCharacteristics(), SaveTransactionCharacteristics(), SerializeTransactionState(), SnapBuildExportSnapshot(), SnapBuildInitialSnapshot(), StartParallelWorkerTransaction(), and StartTransaction().
bool XactReadOnly |
Definition at line 81 of file xact.c.
Referenced by AbortSubTransaction(), check_transaction_read_only(), CommitSubTransaction(), CreateReplicationSlot(), DoCopy(), ExportSnapshot(), GetSafeSnapshot(), GetSerializableTransactionSnapshot(), GetSerializableTransactionSnapshotInt(), ImportSnapshot(), PreventCommandIfReadOnly(), PushTransaction(), RestoreTransactionCharacteristics(), SaveTransactionCharacteristics(), SetSerializableTransactionSnapshot(), SnapBuildExportSnapshot(), standard_ExecutorStart(), standard_ProcessUtility(), and StartTransaction().
|
static |
Definition at line 279 of file xact.c.
Referenced by GetCurrentTransactionStartTimestamp(), SetParallelStartTimestamps(), and StartTransaction().
|
static |
Definition at line 281 of file xact.c.
Referenced by GetCurrentTransactionStopTimestamp(), and StartTransaction().
|
static |
Definition at line 124 of file xact.c.
Referenced by AssignTransactionId(), CleanupTransaction(), CommitTransaction(), GetTopFullTransactionId(), GetTopFullTransactionIdIfAny(), GetTopTransactionId(), GetTopTransactionIdIfAny(), PrepareTransaction(), SerializeTransactionState(), StartParallelWorkerTransaction(), and StartTransaction().