PostgreSQL Source Code  git master
xact.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * xact.h
4  * postgres transaction system definitions
5  *
6  *
7  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/access/xact.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef XACT_H
15 #define XACT_H
16 
17 #include "access/xlogreader.h"
18 #include "lib/stringinfo.h"
19 #include "nodes/pg_list.h"
20 #include "storage/relfilenode.h"
21 #include "storage/sinval.h"
22 #include "utils/datetime.h"
23 
24 /*
25  * Maximum size of Global Transaction ID (including '\0').
26  *
27  * Note that the max value of GIDSIZE must fit in the uint16 gidlen,
28  * specified in TwoPhaseFileHeader.
29  */
30 #define GIDSIZE 200
31 
32 /*
33  * Xact isolation levels
34  */
35 #define XACT_READ_UNCOMMITTED 0
36 #define XACT_READ_COMMITTED 1
37 #define XACT_REPEATABLE_READ 2
38 #define XACT_SERIALIZABLE 3
39 
40 extern int DefaultXactIsoLevel;
41 extern PGDLLIMPORT int XactIsoLevel;
42 
43 /*
44  * We implement three isolation levels internally.
45  * The two stronger ones use one snapshot per database transaction;
46  * the others use one snapshot per statement.
47  * Serializable uses predicate locks in addition to snapshots.
48  * These macros should be used to check which isolation level is selected.
49  */
50 #define IsolationUsesXactSnapshot() (XactIsoLevel >= XACT_REPEATABLE_READ)
51 #define IsolationIsSerializable() (XactIsoLevel == XACT_SERIALIZABLE)
52 
53 /* Xact read-only state */
54 extern bool DefaultXactReadOnly;
55 extern bool XactReadOnly;
56 
57 /*
58  * Xact is deferrable -- only meaningful (currently) for read only
59  * SERIALIZABLE transactions
60  */
61 extern bool DefaultXactDeferrable;
62 extern bool XactDeferrable;
63 
64 typedef enum
65 {
66  SYNCHRONOUS_COMMIT_OFF, /* asynchronous commit */
67  SYNCHRONOUS_COMMIT_LOCAL_FLUSH, /* wait for local flush only */
68  SYNCHRONOUS_COMMIT_REMOTE_WRITE, /* wait for local flush and remote
69  * write */
70  SYNCHRONOUS_COMMIT_REMOTE_FLUSH, /* wait for local and remote flush */
71  SYNCHRONOUS_COMMIT_REMOTE_APPLY /* wait for local flush and remote apply */
73 
74 /* Define the default setting for synchronous_commit */
75 #define SYNCHRONOUS_COMMIT_ON SYNCHRONOUS_COMMIT_REMOTE_FLUSH
76 
77 /* Synchronous commit level */
78 extern int synchronous_commit;
79 
80 /*
81  * Miscellaneous flag bits to record events which occur on the top level
82  * transaction. These flags are only persisted in MyXactFlags and are intended
83  * so we remember to do certain things later in the transaction. This is
84  * globally accessible, so can be set from anywhere in the code which requires
85  * recording flags.
86  */
87 extern int MyXactFlags;
88 
89 /*
90  * XACT_FLAGS_ACCESSEDTEMPREL - set when a temporary relation is accessed. We
91  * don't allow PREPARE TRANSACTION in that case.
92  */
93 #define XACT_FLAGS_ACCESSEDTEMPREL (1U << 0)
94 
95 /*
96  * XACT_FLAGS_ACQUIREDACCESSEXCLUSIVELOCK - records whether the top level xact
97  * logged any Access Exclusive Locks.
98  */
99 #define XACT_FLAGS_ACQUIREDACCESSEXCLUSIVELOCK (1U << 1)
100 
101 
102 /*
103  * start- and end-of-transaction callbacks for dynamically loaded modules
104  */
105 typedef enum
106 {
115 } XactEvent;
116 
117 typedef void (*XactCallback) (XactEvent event, void *arg);
118 
119 typedef enum
120 {
125 } SubXactEvent;
126 
127 typedef void (*SubXactCallback) (SubXactEvent event, SubTransactionId mySubid,
128  SubTransactionId parentSubid, void *arg);
129 
130 
131 /* ----------------
132  * transaction-related XLOG entries
133  * ----------------
134  */
135 
136 /*
137  * XLOG allows to store some information in high 4 bits of log record xl_info
138  * field. We use 3 for the opcode, and one about an optional flag variable.
139  */
140 #define XLOG_XACT_COMMIT 0x00
141 #define XLOG_XACT_PREPARE 0x10
142 #define XLOG_XACT_ABORT 0x20
143 #define XLOG_XACT_COMMIT_PREPARED 0x30
144 #define XLOG_XACT_ABORT_PREPARED 0x40
145 #define XLOG_XACT_ASSIGNMENT 0x50
146 /* free opcode 0x60 */
147 /* free opcode 0x70 */
148 
149 /* mask for filtering opcodes out of xl_info */
150 #define XLOG_XACT_OPMASK 0x70
151 
152 /* does this record have a 'xinfo' field or not */
153 #define XLOG_XACT_HAS_INFO 0x80
154 
155 /*
156  * The following flags, stored in xinfo, determine which information is
157  * contained in commit/abort records.
158  */
159 #define XACT_XINFO_HAS_DBINFO (1U << 0)
160 #define XACT_XINFO_HAS_SUBXACTS (1U << 1)
161 #define XACT_XINFO_HAS_RELFILENODES (1U << 2)
162 #define XACT_XINFO_HAS_INVALS (1U << 3)
163 #define XACT_XINFO_HAS_TWOPHASE (1U << 4)
164 #define XACT_XINFO_HAS_ORIGIN (1U << 5)
165 #define XACT_XINFO_HAS_AE_LOCKS (1U << 6)
166 #define XACT_XINFO_HAS_GID (1U << 7)
167 
168 /*
169  * Also stored in xinfo, these indicating a variety of additional actions that
170  * need to occur when emulating transaction effects during recovery.
171  *
172  * They are named XactCompletion... to differentiate them from
173  * EOXact... routines which run at the end of the original transaction
174  * completion.
175  */
176 #define XACT_COMPLETION_APPLY_FEEDBACK (1U << 29)
177 #define XACT_COMPLETION_UPDATE_RELCACHE_FILE (1U << 30)
178 #define XACT_COMPLETION_FORCE_SYNC_COMMIT (1U << 31)
179 
180 /* Access macros for above flags */
181 #define XactCompletionApplyFeedback(xinfo) \
182  ((xinfo & XACT_COMPLETION_APPLY_FEEDBACK) != 0)
183 #define XactCompletionRelcacheInitFileInval(xinfo) \
184  ((xinfo & XACT_COMPLETION_UPDATE_RELCACHE_FILE) != 0)
185 #define XactCompletionForceSyncCommit(xinfo) \
186  ((xinfo & XACT_COMPLETION_FORCE_SYNC_COMMIT) != 0)
187 
188 typedef struct xl_xact_assignment
189 {
190  TransactionId xtop; /* assigned XID's top-level XID */
191  int nsubxacts; /* number of subtransaction XIDs */
192  TransactionId xsub[FLEXIBLE_ARRAY_MEMBER]; /* assigned subxids */
194 
195 #define MinSizeOfXactAssignment offsetof(xl_xact_assignment, xsub)
196 
197 /*
198  * Commit and abort records can contain a lot of information. But a large
199  * portion of the records won't need all possible pieces of information. So we
200  * only include what's needed.
201  *
202  * A minimal commit/abort record only consists of a xl_xact_commit/abort
203  * struct. The presence of additional information is indicated by bits set in
204  * 'xl_xact_xinfo->xinfo'. The presence of the xinfo field itself is signalled
205  * by a set XLOG_XACT_HAS_INFO bit in the xl_info field.
206  *
207  * NB: All the individual data chunks should be sized to multiples of
208  * sizeof(int) and only require int32 alignment. If they require bigger
209  * alignment, they need to be copied upon reading.
210  */
211 
212 /* sub-records for commit/abort */
213 
214 typedef struct xl_xact_xinfo
215 {
216  /*
217  * Even though we right now only require 1 byte of space in xinfo we use
218  * four so following records don't have to care about alignment. Commit
219  * records can be large, so copying large portions isn't attractive.
220  */
222 } xl_xact_xinfo;
223 
224 typedef struct xl_xact_dbinfo
225 {
226  Oid dbId; /* MyDatabaseId */
227  Oid tsId; /* MyDatabaseTableSpace */
229 
230 typedef struct xl_xact_subxacts
231 {
232  int nsubxacts; /* number of subtransaction XIDs */
233  TransactionId subxacts[FLEXIBLE_ARRAY_MEMBER];
235 #define MinSizeOfXactSubxacts offsetof(xl_xact_subxacts, subxacts)
236 
237 typedef struct xl_xact_relfilenodes
238 {
239  int nrels; /* number of subtransaction XIDs */
240  RelFileNode xnodes[FLEXIBLE_ARRAY_MEMBER];
242 #define MinSizeOfXactRelfilenodes offsetof(xl_xact_relfilenodes, xnodes)
243 
244 typedef struct xl_xact_invals
245 {
246  int nmsgs; /* number of shared inval msgs */
247  SharedInvalidationMessage msgs[FLEXIBLE_ARRAY_MEMBER];
249 #define MinSizeOfXactInvals offsetof(xl_xact_invals, msgs)
250 
251 typedef struct xl_xact_twophase
252 {
255 
256 typedef struct xl_xact_origin
257 {
261 
262 typedef struct xl_xact_commit
263 {
264  TimestampTz xact_time; /* time of commit */
265 
266  /* xl_xact_xinfo follows if XLOG_XACT_HAS_INFO */
267  /* xl_xact_dbinfo follows if XINFO_HAS_DBINFO */
268  /* xl_xact_subxacts follows if XINFO_HAS_SUBXACT */
269  /* xl_xact_relfilenodes follows if XINFO_HAS_RELFILENODES */
270  /* xl_xact_invals follows if XINFO_HAS_INVALS */
271  /* xl_xact_twophase follows if XINFO_HAS_TWOPHASE */
272  /* twophase_gid follows if XINFO_HAS_GID. As a null-terminated string. */
273  /* xl_xact_origin follows if XINFO_HAS_ORIGIN, stored unaligned! */
275 #define MinSizeOfXactCommit (offsetof(xl_xact_commit, xact_time) + sizeof(TimestampTz))
276 
277 typedef struct xl_xact_abort
278 {
279  TimestampTz xact_time; /* time of abort */
280 
281  /* xl_xact_xinfo follows if XLOG_XACT_HAS_INFO */
282  /* xl_xact_dbinfo follows if XINFO_HAS_DBINFO */
283  /* xl_xact_subxacts follows if HAS_SUBXACT */
284  /* xl_xact_relfilenodes follows if HAS_RELFILENODES */
285  /* No invalidation messages needed. */
286  /* xl_xact_twophase follows if XINFO_HAS_TWOPHASE */
287  /* twophase_gid follows if XINFO_HAS_GID. As a null-terminated string. */
288  /* xl_xact_origin follows if XINFO_HAS_ORIGIN, stored unaligned! */
289 } xl_xact_abort;
290 #define MinSizeOfXactAbort sizeof(xl_xact_abort)
291 
292 /*
293  * Commit/Abort records in the above form are a bit verbose to parse, so
294  * there's a deconstructed versions generated by ParseCommit/AbortRecord() for
295  * easier consumption.
296  */
297 typedef struct xl_xact_parsed_commit
298 {
301 
302  Oid dbId; /* MyDatabaseId */
303  Oid tsId; /* MyDatabaseTableSpace */
304 
307 
308  int nrels;
310 
311  int nmsgs;
313 
314  TransactionId twophase_xid; /* only for 2PC */
315  char twophase_gid[GIDSIZE]; /* only for 2PC */
316  int nabortrels; /* only for 2PC */
317  RelFileNode *abortnodes; /* only for 2PC */
318 
322 
324 
325 typedef struct xl_xact_parsed_abort
326 {
329 
330  Oid dbId; /* MyDatabaseId */
331  Oid tsId; /* MyDatabaseTableSpace */
332 
335 
336  int nrels;
338 
339  TransactionId twophase_xid; /* only for 2PC */
340  char twophase_gid[GIDSIZE]; /* only for 2PC */
341 
345 
346 
347 /* ----------------
348  * extern definitions
349  * ----------------
350  */
351 extern bool IsTransactionState(void);
352 extern bool IsAbortedTransactionBlockState(void);
359 extern void MarkCurrentTransactionIdLoggedIfAny(void);
360 extern bool SubTransactionIsActive(SubTransactionId subxid);
361 extern CommandId GetCurrentCommandId(bool used);
365 extern void SetCurrentStatementStartTimestamp(void);
366 extern int GetCurrentTransactionNestLevel(void);
368 extern void CommandCounterIncrement(void);
369 extern void ForceSyncCommit(void);
370 extern void StartTransactionCommand(void);
371 extern void CommitTransactionCommand(void);
372 extern void AbortCurrentTransaction(void);
373 extern void BeginTransactionBlock(void);
374 extern bool EndTransactionBlock(void);
375 extern bool PrepareTransactionBlock(const char *gid);
376 extern void UserAbortTransactionBlock(void);
377 extern void BeginImplicitTransactionBlock(void);
378 extern void EndImplicitTransactionBlock(void);
379 extern void ReleaseSavepoint(const char *name);
380 extern void DefineSavepoint(const char *name);
381 extern void RollbackToSavepoint(const char *name);
382 extern void BeginInternalSubTransaction(const char *name);
383 extern void ReleaseCurrentSubTransaction(void);
385 extern bool IsSubTransaction(void);
387 extern void SerializeTransactionState(Size maxsize, char *start_address);
388 extern void StartParallelWorkerTransaction(char *tstatespace);
389 extern void EndParallelWorkerTransaction(void);
390 extern bool IsTransactionBlock(void);
391 extern bool IsTransactionOrTransactionBlock(void);
392 extern char TransactionBlockStatusCode(void);
393 extern void AbortOutOfAnyTransaction(void);
394 extern void PreventInTransactionBlock(bool isTopLevel, const char *stmtType);
395 extern void RequireTransactionBlock(bool isTopLevel, const char *stmtType);
396 extern void WarnNoTransactionBlock(bool isTopLevel, const char *stmtType);
397 extern bool IsInTransactionBlock(bool isTopLevel);
398 extern void RegisterXactCallback(XactCallback callback, void *arg);
399 extern void UnregisterXactCallback(XactCallback callback, void *arg);
402 
403 extern int xactGetCommittedChildren(TransactionId **ptr);
404 
405 extern XLogRecPtr XactLogCommitRecord(TimestampTz commit_time,
406  int nsubxacts, TransactionId *subxacts,
407  int nrels, RelFileNode *rels,
408  int nmsgs, SharedInvalidationMessage *msgs,
409  bool relcacheInval, bool forceSync,
410  int xactflags,
411  TransactionId twophase_xid,
412  const char *twophase_gid);
413 
414 extern XLogRecPtr XactLogAbortRecord(TimestampTz abort_time,
415  int nsubxacts, TransactionId *subxacts,
416  int nrels, RelFileNode *rels,
417  int xactflags, TransactionId twophase_xid,
418  const char *twophase_gid);
419 extern void xact_redo(XLogReaderState *record);
420 
421 /* xactdesc.c */
422 extern void xact_desc(StringInfo buf, XLogReaderState *record);
423 extern const char *xact_identify(uint8 info);
424 
425 /* also in xactdesc.c, so they can be shared between front/backend code */
426 extern void ParseCommitRecord(uint8 info, xl_xact_commit *xlrec, xl_xact_parsed_commit *parsed);
427 extern void ParseAbortRecord(uint8 info, xl_xact_abort *xlrec, xl_xact_parsed_abort *parsed);
428 
429 extern void EnterParallelMode(void);
430 extern void ExitParallelMode(void);
431 extern bool IsInParallelMode(void);
432 
433 #endif /* XACT_H */
bool IsTransactionOrTransactionBlock(void)
Definition: xact.c:4440
void EnterParallelMode(void)
Definition: xact.c:872
RelFileNode * xnodes
Definition: xact.h:309
void UnregisterSubXactCallback(SubXactCallback callback, void *arg)
Definition: xact.c:3370
struct xl_xact_parsed_commit xl_xact_parsed_commit
uint32 CommandId
Definition: c.h:488
void UserAbortTransactionBlock(void)
Definition: xact.c:3668
void EndImplicitTransactionBlock(void)
Definition: xact.c:3803
XactEvent
Definition: xact.h:105
const char * xact_identify(uint8 info)
Definition: xactdesc.c:341
struct xl_xact_parsed_abort xl_xact_parsed_abort
void AbortOutOfAnyTransaction(void)
Definition: xact.c:4318
struct xl_xact_xinfo xl_xact_xinfo
void PreventInTransactionBlock(bool isTopLevel, const char *stmtType)
Definition: xact.c:3153
int GetCurrentTransactionNestLevel(void)
Definition: xact.c:753
uint32 TransactionId
Definition: c.h:474
TransactionId GetTopTransactionIdIfAny(void)
Definition: xact.c:404
TimestampTz origin_timestamp
Definition: xact.h:320
bool IsTransactionBlock(void)
Definition: xact.c:4422
TimestampTz GetCurrentTransactionStopTimestamp(void)
Definition: xact.c:721
void ParseCommitRecord(uint8 info, xl_xact_commit *xlrec, xl_xact_parsed_commit *parsed)
Definition: xactdesc.c:34
void StartTransactionCommand(void)
Definition: xact.c:2673
void BeginInternalSubTransaction(const char *name)
Definition: xact.c:4146
int64 TimestampTz
Definition: timestamp.h:39
void(* SubXactCallback)(SubXactEvent event, SubTransactionId mySubid, SubTransactionId parentSubid, void *arg)
Definition: xact.h:127
XLogRecPtr XactLogCommitRecord(TimestampTz commit_time, int nsubxacts, TransactionId *subxacts, int nrels, RelFileNode *rels, int nmsgs, SharedInvalidationMessage *msgs, bool relcacheInval, bool forceSync, int xactflags, TransactionId twophase_xid, const char *twophase_gid)
Definition: xact.c:5232
TransactionId xid
Definition: xact.h:253
TransactionId twophase_xid
Definition: xact.h:314
PGDLLIMPORT int XactIsoLevel
Definition: xact.c:73
unsigned char uint8
Definition: c.h:323
TransactionId * subxacts
Definition: xact.h:306
SharedInvalidationMessage * msgs
Definition: xact.h:312
TransactionId GetCurrentTransactionId(void)
Definition: xact.c:417
void ReleaseSavepoint(const char *name)
Definition: xact.c:3910
TransactionId xtop
Definition: xact.h:190
XLogRecPtr origin_lsn
Definition: xact.h:319
TransactionId xsub[FLEXIBLE_ARRAY_MEMBER]
Definition: xact.h:192
void BeginImplicitTransactionBlock(void)
Definition: xact.c:3778
uint32 SubTransactionId
Definition: c.h:478
struct xl_xact_dbinfo xl_xact_dbinfo
void ParseAbortRecord(uint8 info, xl_xact_abort *xlrec, xl_xact_parsed_abort *parsed)
Definition: xactdesc.c:129
unsigned int Oid
Definition: postgres_ext.h:31
bool XactReadOnly
Definition: xact.c:76
bool XactDeferrable
Definition: xact.c:79
TimestampTz xact_time
Definition: xact.h:279
Oid tsId
Definition: xact.h:227
struct xl_xact_origin xl_xact_origin
void StartParallelWorkerTransaction(char *tstatespace)
Definition: xact.c:5039
SubTransactionId GetCurrentSubTransactionId(void)
Definition: xact.c:641
xl_xact_parsed_commit xl_xact_parsed_prepare
Definition: xact.h:323
#define PGDLLIMPORT
Definition: c.h:1140
int synchronous_commit
Definition: xact.c:81
void(* XactCallback)(XactEvent event, void *arg)
Definition: xact.h:117
int MyXactFlags
Definition: xact.c:117
void BeginTransactionBlock(void)
Definition: xact.c:3412
void CommandCounterIncrement(void)
Definition: xact.c:914
void MarkCurrentTransactionIdLoggedIfAny(void)
Definition: xact.c:445
bool IsSubTransaction(void)
Definition: xact.c:4495
bool IsAbortedTransactionBlockState(void)
Definition: xact.c:370
bool SubTransactionIsActive(SubTransactionId subxid)
Definition: xact.c:655
void SetCurrentStatementStartTimestamp(void)
Definition: xact.c:732
static void callback(struct sockaddr *addr, struct sockaddr *mask, void *unused)
Definition: test_ifaddrs.c:48
#define GIDSIZE
Definition: xact.h:30
void AbortCurrentTransaction(void)
Definition: xact.c:2984
bool DefaultXactReadOnly
Definition: xact.c:75
static char * buf
Definition: pg_test_fsync.c:67
TimestampTz xact_time
Definition: xact.h:264
struct xl_xact_commit xl_xact_commit
Size EstimateTransactionStateSpace(void)
Definition: xact.c:4938
void RegisterXactCallback(XactCallback callback, void *arg)
Definition: xact.c:3302
struct xl_xact_twophase xl_xact_twophase
unsigned int uint32
Definition: c.h:325
void RequireTransactionBlock(bool isTopLevel, const char *stmtType)
Definition: xact.c:3219
XLogRecPtr origin_lsn
Definition: xact.h:258
TransactionId * subxacts
Definition: xact.h:334
struct xl_xact_invals xl_xact_invals
bool DefaultXactDeferrable
Definition: xact.c:78
void ReleaseCurrentSubTransaction(void)
Definition: xact.c:4217
struct xl_xact_abort xl_xact_abort
void UnregisterXactCallback(XactCallback callback, void *arg)
Definition: xact.c:3315
void DefineSavepoint(const char *name)
Definition: xact.c:3825
SubXactEvent
Definition: xact.h:119
void xact_desc(StringInfo buf, XLogReaderState *record)
Definition: xactdesc.c:308
int xactGetCommittedChildren(TransactionId **ptr)
Definition: xact.c:5208
void ForceSyncCommit(void)
Definition: xact.c:962
uint32 xinfo
Definition: xact.h:221
XLogRecPtr origin_lsn
Definition: xact.h:342
bool PrepareTransactionBlock(const char *gid)
Definition: xact.c:3480
RelFileNode * xnodes
Definition: xact.h:337
int nsubxacts
Definition: xact.h:232
int DefaultXactIsoLevel
Definition: xact.c:72
void ExitParallelMode(void)
Definition: xact.c:885
SyncCommitLevel
Definition: xact.h:64
CommandId GetCurrentCommandId(bool used)
Definition: xact.c:679
void SerializeTransactionState(Size maxsize, char *start_address)
Definition: xact.c:4971
Oid dbId
Definition: xact.h:226
TransactionId twophase_xid
Definition: xact.h:339
struct xl_xact_assignment xl_xact_assignment
void RollbackAndReleaseCurrentSubTransaction(void)
Definition: xact.c:4251
XLogRecPtr XactLogAbortRecord(TimestampTz abort_time, int nsubxacts, TransactionId *subxacts, int nrels, RelFileNode *rels, int xactflags, TransactionId twophase_xid, const char *twophase_gid)
Definition: xact.c:5387
RelFileNode * abortnodes
Definition: xact.h:317
bool TransactionIdIsCurrentTransactionId(TransactionId xid)
Definition: xact.c:765
uint64 XLogRecPtr
Definition: xlogdefs.h:21
void WarnNoTransactionBlock(bool isTopLevel, const char *stmtType)
Definition: xact.c:3213
TransactionId GetCurrentTransactionIdIfAny(void)
Definition: xact.c:434
struct xl_xact_subxacts xl_xact_subxacts
TimestampTz GetCurrentStatementStartTimestamp(void)
Definition: xact.c:709
size_t Size
Definition: c.h:433
void CommitTransactionCommand(void)
Definition: xact.c:2744
TimestampTz xact_time
Definition: xact.h:327
const char * name
Definition: encode.c:521
bool IsInTransactionBlock(bool isTopLevel)
Definition: xact.c:3267
TimestampTz origin_timestamp
Definition: xact.h:259
struct xl_xact_relfilenodes xl_xact_relfilenodes
TransactionId GetTopTransactionId(void)
Definition: xact.c:389
void RegisterSubXactCallback(SubXactCallback callback, void *arg)
Definition: xact.c:3357
bool EndTransactionBlock(void)
Definition: xact.c:3532
char TransactionBlockStatusCode(void)
Definition: xact.c:4454
void * arg
void RollbackToSavepoint(const char *name)
Definition: xact.c:4019
TimestampTz origin_timestamp
Definition: xact.h:343
void EndParallelWorkerTransaction(void)
Definition: xact.c:5062
int nmsgs
Definition: xact.h:246
bool IsInParallelMode(void)
Definition: xact.c:905
void xact_redo(XLogReaderState *record)
Definition: xact.c:5766
TimestampTz GetCurrentTransactionStartTimestamp(void)
Definition: xact.c:700
TimestampTz xact_time
Definition: xact.h:299
TransactionId GetStableLatestTransactionId(void)
Definition: xact.c:461
bool IsTransactionState(void)
Definition: xact.c:350