xact.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530
  1. /*-------------------------------------------------------------------------
  2. *
  3. * xact.h
  4. * postgres transaction system definitions
  5. *
  6. *
  7. * Portions Copyright (c) 1996-2022, 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. #include "access/transam.h"
  17. #include "access/xlogreader.h"
  18. #include "datatype/timestamp.h"
  19. #include "lib/stringinfo.h"
  20. #include "nodes/pg_list.h"
  21. #include "storage/relfilenode.h"
  22. #include "storage/sinval.h"
  23. /*
  24. * Maximum size of Global Transaction ID (including '\0').
  25. *
  26. * Note that the max value of GIDSIZE must fit in the uint16 gidlen,
  27. * specified in TwoPhaseFileHeader.
  28. */
  29. #define GIDSIZE 200
  30. /*
  31. * Xact isolation levels
  32. */
  33. #define XACT_READ_UNCOMMITTED 0
  34. #define XACT_READ_COMMITTED 1
  35. #define XACT_REPEATABLE_READ 2
  36. #define XACT_SERIALIZABLE 3
  37. extern PGDLLIMPORT int DefaultXactIsoLevel;
  38. extern PGDLLIMPORT int XactIsoLevel;
  39. /*
  40. * We implement three isolation levels internally.
  41. * The two stronger ones use one snapshot per database transaction;
  42. * the others use one snapshot per statement.
  43. * Serializable uses predicate locks in addition to snapshots.
  44. * These macros should be used to check which isolation level is selected.
  45. */
  46. #define IsolationUsesXactSnapshot() (XactIsoLevel >= XACT_REPEATABLE_READ)
  47. #define IsolationIsSerializable() (XactIsoLevel == XACT_SERIALIZABLE)
  48. /* Xact read-only state */
  49. extern PGDLLIMPORT bool DefaultXactReadOnly;
  50. extern PGDLLIMPORT bool XactReadOnly;
  51. /* flag for logging statements in this transaction */
  52. extern PGDLLIMPORT bool xact_is_sampled;
  53. /*
  54. * Xact is deferrable -- only meaningful (currently) for read only
  55. * SERIALIZABLE transactions
  56. */
  57. extern PGDLLIMPORT bool DefaultXactDeferrable;
  58. extern PGDLLIMPORT bool XactDeferrable;
  59. typedef enum
  60. {
  61. SYNCHRONOUS_COMMIT_OFF, /* asynchronous commit */
  62. SYNCHRONOUS_COMMIT_LOCAL_FLUSH, /* wait for local flush only */
  63. SYNCHRONOUS_COMMIT_REMOTE_WRITE, /* wait for local flush and remote
  64. * write */
  65. SYNCHRONOUS_COMMIT_REMOTE_FLUSH, /* wait for local and remote flush */
  66. SYNCHRONOUS_COMMIT_REMOTE_APPLY /* wait for local and remote flush and
  67. * remote apply */
  68. } SyncCommitLevel;
  69. /* Define the default setting for synchronous_commit */
  70. #define SYNCHRONOUS_COMMIT_ON SYNCHRONOUS_COMMIT_REMOTE_FLUSH
  71. /* Synchronous commit level */
  72. extern PGDLLIMPORT int synchronous_commit;
  73. /* used during logical streaming of a transaction */
  74. extern PGDLLIMPORT TransactionId CheckXidAlive;
  75. extern PGDLLIMPORT bool bsysscan;
  76. /*
  77. * Miscellaneous flag bits to record events which occur on the top level
  78. * transaction. These flags are only persisted in MyXactFlags and are intended
  79. * so we remember to do certain things later in the transaction. This is
  80. * globally accessible, so can be set from anywhere in the code which requires
  81. * recording flags.
  82. */
  83. extern PGDLLIMPORT int MyXactFlags;
  84. /*
  85. * XACT_FLAGS_ACCESSEDTEMPNAMESPACE - set when a temporary object is accessed.
  86. * We don't allow PREPARE TRANSACTION in that case.
  87. */
  88. #define XACT_FLAGS_ACCESSEDTEMPNAMESPACE (1U << 0)
  89. /*
  90. * XACT_FLAGS_ACQUIREDACCESSEXCLUSIVELOCK - records whether the top level xact
  91. * logged any Access Exclusive Locks.
  92. */
  93. #define XACT_FLAGS_ACQUIREDACCESSEXCLUSIVELOCK (1U << 1)
  94. /*
  95. * XACT_FLAGS_NEEDIMMEDIATECOMMIT - records whether the top level statement
  96. * is one that requires immediate commit, such as CREATE DATABASE.
  97. */
  98. #define XACT_FLAGS_NEEDIMMEDIATECOMMIT (1U << 2)
  99. /*
  100. * XACT_FLAGS_PIPELINING - set when we complete an extended-query-protocol
  101. * Execute message. This is useful for detecting that an implicit transaction
  102. * block has been created via pipelining.
  103. */
  104. #define XACT_FLAGS_PIPELINING (1U << 3)
  105. /*
  106. * start- and end-of-transaction callbacks for dynamically loaded modules
  107. */
  108. typedef enum
  109. {
  110. XACT_EVENT_COMMIT,
  111. XACT_EVENT_PARALLEL_COMMIT,
  112. XACT_EVENT_ABORT,
  113. XACT_EVENT_PARALLEL_ABORT,
  114. XACT_EVENT_PREPARE,
  115. XACT_EVENT_PRE_COMMIT,
  116. XACT_EVENT_PARALLEL_PRE_COMMIT,
  117. XACT_EVENT_PRE_PREPARE
  118. } XactEvent;
  119. typedef void (*XactCallback) (XactEvent event, void *arg);
  120. typedef enum
  121. {
  122. SUBXACT_EVENT_START_SUB,
  123. SUBXACT_EVENT_COMMIT_SUB,
  124. SUBXACT_EVENT_ABORT_SUB,
  125. SUBXACT_EVENT_PRE_COMMIT_SUB
  126. } SubXactEvent;
  127. typedef void (*SubXactCallback) (SubXactEvent event, SubTransactionId mySubid,
  128. SubTransactionId parentSubid, void *arg);
  129. /* Data structure for Save/RestoreTransactionCharacteristics */
  130. typedef struct SavedTransactionCharacteristics
  131. {
  132. int save_XactIsoLevel;
  133. bool save_XactReadOnly;
  134. bool save_XactDeferrable;
  135. } SavedTransactionCharacteristics;
  136. /* ----------------
  137. * transaction-related XLOG entries
  138. * ----------------
  139. */
  140. /*
  141. * XLOG allows to store some information in high 4 bits of log record xl_info
  142. * field. We use 3 for the opcode, and one about an optional flag variable.
  143. */
  144. #define XLOG_XACT_COMMIT 0x00
  145. #define XLOG_XACT_PREPARE 0x10
  146. #define XLOG_XACT_ABORT 0x20
  147. #define XLOG_XACT_COMMIT_PREPARED 0x30
  148. #define XLOG_XACT_ABORT_PREPARED 0x40
  149. #define XLOG_XACT_ASSIGNMENT 0x50
  150. #define XLOG_XACT_INVALIDATIONS 0x60
  151. /* free opcode 0x70 */
  152. /* mask for filtering opcodes out of xl_info */
  153. #define XLOG_XACT_OPMASK 0x70
  154. /* does this record have a 'xinfo' field or not */
  155. #define XLOG_XACT_HAS_INFO 0x80
  156. /*
  157. * The following flags, stored in xinfo, determine which information is
  158. * contained in commit/abort records.
  159. */
  160. #define XACT_XINFO_HAS_DBINFO (1U << 0)
  161. #define XACT_XINFO_HAS_SUBXACTS (1U << 1)
  162. #define XACT_XINFO_HAS_RELFILENODES (1U << 2)
  163. #define XACT_XINFO_HAS_INVALS (1U << 3)
  164. #define XACT_XINFO_HAS_TWOPHASE (1U << 4)
  165. #define XACT_XINFO_HAS_ORIGIN (1U << 5)
  166. #define XACT_XINFO_HAS_AE_LOCKS (1U << 6)
  167. #define XACT_XINFO_HAS_GID (1U << 7)
  168. #define XACT_XINFO_HAS_DROPPED_STATS (1U << 8)
  169. /*
  170. * Also stored in xinfo, these indicating a variety of additional actions that
  171. * need to occur when emulating transaction effects during recovery.
  172. *
  173. * They are named XactCompletion... to differentiate them from
  174. * EOXact... routines which run at the end of the original transaction
  175. * completion.
  176. */
  177. #define XACT_COMPLETION_APPLY_FEEDBACK (1U << 29)
  178. #define XACT_COMPLETION_UPDATE_RELCACHE_FILE (1U << 30)
  179. #define XACT_COMPLETION_FORCE_SYNC_COMMIT (1U << 31)
  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. typedef struct xl_xact_assignment
  188. {
  189. TransactionId xtop; /* assigned XID's top-level XID */
  190. int nsubxacts; /* number of subtransaction XIDs */
  191. TransactionId xsub[FLEXIBLE_ARRAY_MEMBER]; /* assigned subxids */
  192. } xl_xact_assignment;
  193. #define MinSizeOfXactAssignment offsetof(xl_xact_assignment, xsub)
  194. /*
  195. * Commit and abort records can contain a lot of information. But a large
  196. * portion of the records won't need all possible pieces of information. So we
  197. * only include what's needed.
  198. *
  199. * A minimal commit/abort record only consists of a xl_xact_commit/abort
  200. * struct. The presence of additional information is indicated by bits set in
  201. * 'xl_xact_xinfo->xinfo'. The presence of the xinfo field itself is signaled
  202. * by a set XLOG_XACT_HAS_INFO bit in the xl_info field.
  203. *
  204. * NB: All the individual data chunks should be sized to multiples of
  205. * sizeof(int) and only require int32 alignment. If they require bigger
  206. * alignment, they need to be copied upon reading.
  207. */
  208. /* sub-records for commit/abort */
  209. typedef struct xl_xact_xinfo
  210. {
  211. /*
  212. * Even though we right now only require two bytes of space in xinfo we
  213. * use four so following records don't have to care about alignment.
  214. * Commit records can be large, so copying large portions isn't
  215. * attractive.
  216. */
  217. uint32 xinfo;
  218. } xl_xact_xinfo;
  219. typedef struct xl_xact_dbinfo
  220. {
  221. Oid dbId; /* MyDatabaseId */
  222. Oid tsId; /* MyDatabaseTableSpace */
  223. } xl_xact_dbinfo;
  224. typedef struct xl_xact_subxacts
  225. {
  226. int nsubxacts; /* number of subtransaction XIDs */
  227. TransactionId subxacts[FLEXIBLE_ARRAY_MEMBER];
  228. } xl_xact_subxacts;
  229. #define MinSizeOfXactSubxacts offsetof(xl_xact_subxacts, subxacts)
  230. typedef struct xl_xact_relfilenodes
  231. {
  232. int nrels; /* number of relations */
  233. RelFileNode xnodes[FLEXIBLE_ARRAY_MEMBER];
  234. } xl_xact_relfilenodes;
  235. #define MinSizeOfXactRelfilenodes offsetof(xl_xact_relfilenodes, xnodes)
  236. /*
  237. * A transactionally dropped statistics entry.
  238. *
  239. * Declared here rather than pgstat.h because pgstat.h can't be included from
  240. * frontend code, but the WAL format needs to be readable by frontend
  241. * programs.
  242. */
  243. typedef struct xl_xact_stats_item
  244. {
  245. int kind;
  246. Oid dboid;
  247. Oid objoid;
  248. } xl_xact_stats_item;
  249. typedef struct xl_xact_stats_items
  250. {
  251. int nitems;
  252. xl_xact_stats_item items[FLEXIBLE_ARRAY_MEMBER];
  253. } xl_xact_stats_items;
  254. #define MinSizeOfXactStatsItems offsetof(xl_xact_stats_items, items)
  255. typedef struct xl_xact_invals
  256. {
  257. int nmsgs; /* number of shared inval msgs */
  258. SharedInvalidationMessage msgs[FLEXIBLE_ARRAY_MEMBER];
  259. } xl_xact_invals;
  260. #define MinSizeOfXactInvals offsetof(xl_xact_invals, msgs)
  261. typedef struct xl_xact_twophase
  262. {
  263. TransactionId xid;
  264. } xl_xact_twophase;
  265. typedef struct xl_xact_origin
  266. {
  267. XLogRecPtr origin_lsn;
  268. TimestampTz origin_timestamp;
  269. } xl_xact_origin;
  270. typedef struct xl_xact_commit
  271. {
  272. TimestampTz xact_time; /* time of commit */
  273. /* xl_xact_xinfo follows if XLOG_XACT_HAS_INFO */
  274. /* xl_xact_dbinfo follows if XINFO_HAS_DBINFO */
  275. /* xl_xact_subxacts follows if XINFO_HAS_SUBXACT */
  276. /* xl_xact_relfilenodes follows if XINFO_HAS_RELFILENODES */
  277. /* xl_xact_stats_items follows if XINFO_HAS_DROPPED_STATS */
  278. /* xl_xact_invals follows if XINFO_HAS_INVALS */
  279. /* xl_xact_twophase follows if XINFO_HAS_TWOPHASE */
  280. /* twophase_gid follows if XINFO_HAS_GID. As a null-terminated string. */
  281. /* xl_xact_origin follows if XINFO_HAS_ORIGIN, stored unaligned! */
  282. } xl_xact_commit;
  283. #define MinSizeOfXactCommit (offsetof(xl_xact_commit, xact_time) + sizeof(TimestampTz))
  284. typedef struct xl_xact_abort
  285. {
  286. TimestampTz xact_time; /* time of abort */
  287. /* xl_xact_xinfo follows if XLOG_XACT_HAS_INFO */
  288. /* xl_xact_dbinfo follows if XINFO_HAS_DBINFO */
  289. /* xl_xact_subxacts follows if XINFO_HAS_SUBXACT */
  290. /* xl_xact_relfilenodes follows if XINFO_HAS_RELFILENODES */
  291. /* xl_xact_stats_items follows if XINFO_HAS_DROPPED_STATS */
  292. /* No invalidation messages needed. */
  293. /* xl_xact_twophase follows if XINFO_HAS_TWOPHASE */
  294. /* twophase_gid follows if XINFO_HAS_GID. As a null-terminated string. */
  295. /* xl_xact_origin follows if XINFO_HAS_ORIGIN, stored unaligned! */
  296. } xl_xact_abort;
  297. #define MinSizeOfXactAbort sizeof(xl_xact_abort)
  298. typedef struct xl_xact_prepare
  299. {
  300. uint32 magic; /* format identifier */
  301. uint32 total_len; /* actual file length */
  302. TransactionId xid; /* original transaction XID */
  303. Oid database; /* OID of database it was in */
  304. TimestampTz prepared_at; /* time of preparation */
  305. Oid owner; /* user running the transaction */
  306. int32 nsubxacts; /* number of following subxact XIDs */
  307. int32 ncommitrels; /* number of delete-on-commit rels */
  308. int32 nabortrels; /* number of delete-on-abort rels */
  309. int32 ncommitstats; /* number of stats to drop on commit */
  310. int32 nabortstats; /* number of stats to drop on abort */
  311. int32 ninvalmsgs; /* number of cache invalidation messages */
  312. bool initfileinval; /* does relcache init file need invalidation? */
  313. uint16 gidlen; /* length of the GID - GID follows the header */
  314. XLogRecPtr origin_lsn; /* lsn of this record at origin node */
  315. TimestampTz origin_timestamp; /* time of prepare at origin node */
  316. } xl_xact_prepare;
  317. /*
  318. * Commit/Abort records in the above form are a bit verbose to parse, so
  319. * there's a deconstructed versions generated by ParseCommit/AbortRecord() for
  320. * easier consumption.
  321. */
  322. typedef struct xl_xact_parsed_commit
  323. {
  324. TimestampTz xact_time;
  325. uint32 xinfo;
  326. Oid dbId; /* MyDatabaseId */
  327. Oid tsId; /* MyDatabaseTableSpace */
  328. int nsubxacts;
  329. TransactionId *subxacts;
  330. int nrels;
  331. RelFileNode *xnodes;
  332. int nstats;
  333. xl_xact_stats_item *stats;
  334. int nmsgs;
  335. SharedInvalidationMessage *msgs;
  336. TransactionId twophase_xid; /* only for 2PC */
  337. char twophase_gid[GIDSIZE]; /* only for 2PC */
  338. int nabortrels; /* only for 2PC */
  339. RelFileNode *abortnodes; /* only for 2PC */
  340. int nabortstats; /* only for 2PC */
  341. xl_xact_stats_item *abortstats; /* only for 2PC */
  342. XLogRecPtr origin_lsn;
  343. TimestampTz origin_timestamp;
  344. } xl_xact_parsed_commit;
  345. typedef xl_xact_parsed_commit xl_xact_parsed_prepare;
  346. typedef struct xl_xact_parsed_abort
  347. {
  348. TimestampTz xact_time;
  349. uint32 xinfo;
  350. Oid dbId; /* MyDatabaseId */
  351. Oid tsId; /* MyDatabaseTableSpace */
  352. int nsubxacts;
  353. TransactionId *subxacts;
  354. int nrels;
  355. RelFileNode *xnodes;
  356. int nstats;
  357. xl_xact_stats_item *stats;
  358. TransactionId twophase_xid; /* only for 2PC */
  359. char twophase_gid[GIDSIZE]; /* only for 2PC */
  360. XLogRecPtr origin_lsn;
  361. TimestampTz origin_timestamp;
  362. } xl_xact_parsed_abort;
  363. /* ----------------
  364. * extern definitions
  365. * ----------------
  366. */
  367. extern bool IsTransactionState(void);
  368. extern bool IsAbortedTransactionBlockState(void);
  369. extern TransactionId GetTopTransactionId(void);
  370. extern TransactionId GetTopTransactionIdIfAny(void);
  371. extern TransactionId GetCurrentTransactionId(void);
  372. extern TransactionId GetCurrentTransactionIdIfAny(void);
  373. extern TransactionId GetStableLatestTransactionId(void);
  374. extern SubTransactionId GetCurrentSubTransactionId(void);
  375. extern FullTransactionId GetTopFullTransactionId(void);
  376. extern FullTransactionId GetTopFullTransactionIdIfAny(void);
  377. extern FullTransactionId GetCurrentFullTransactionId(void);
  378. extern FullTransactionId GetCurrentFullTransactionIdIfAny(void);
  379. extern void MarkCurrentTransactionIdLoggedIfAny(void);
  380. extern bool SubTransactionIsActive(SubTransactionId subxid);
  381. extern CommandId GetCurrentCommandId(bool used);
  382. extern void SetParallelStartTimestamps(TimestampTz xact_ts, TimestampTz stmt_ts);
  383. extern TimestampTz GetCurrentTransactionStartTimestamp(void);
  384. extern TimestampTz GetCurrentStatementStartTimestamp(void);
  385. extern TimestampTz GetCurrentTransactionStopTimestamp(void);
  386. extern void SetCurrentStatementStartTimestamp(void);
  387. extern int GetCurrentTransactionNestLevel(void);
  388. extern bool TransactionIdIsCurrentTransactionId(TransactionId xid);
  389. extern void CommandCounterIncrement(void);
  390. extern void ForceSyncCommit(void);
  391. extern void StartTransactionCommand(void);
  392. extern void SaveTransactionCharacteristics(SavedTransactionCharacteristics *s);
  393. extern void RestoreTransactionCharacteristics(const SavedTransactionCharacteristics *s);
  394. extern void CommitTransactionCommand(void);
  395. extern void AbortCurrentTransaction(void);
  396. extern void BeginTransactionBlock(void);
  397. extern bool EndTransactionBlock(bool chain);
  398. extern bool PrepareTransactionBlock(const char *gid);
  399. extern void UserAbortTransactionBlock(bool chain);
  400. extern void BeginImplicitTransactionBlock(void);
  401. extern void EndImplicitTransactionBlock(void);
  402. extern void ReleaseSavepoint(const char *name);
  403. extern void DefineSavepoint(const char *name);
  404. extern void RollbackToSavepoint(const char *name);
  405. extern void BeginInternalSubTransaction(const char *name);
  406. extern void ReleaseCurrentSubTransaction(void);
  407. extern void RollbackAndReleaseCurrentSubTransaction(void);
  408. extern bool IsSubTransaction(void);
  409. extern Size EstimateTransactionStateSpace(void);
  410. extern void SerializeTransactionState(Size maxsize, char *start_address);
  411. extern void StartParallelWorkerTransaction(char *tstatespace);
  412. extern void EndParallelWorkerTransaction(void);
  413. extern bool IsTransactionBlock(void);
  414. extern bool IsTransactionOrTransactionBlock(void);
  415. extern char TransactionBlockStatusCode(void);
  416. extern void AbortOutOfAnyTransaction(void);
  417. extern void PreventInTransactionBlock(bool isTopLevel, const char *stmtType);
  418. extern void RequireTransactionBlock(bool isTopLevel, const char *stmtType);
  419. extern void WarnNoTransactionBlock(bool isTopLevel, const char *stmtType);
  420. extern bool IsInTransactionBlock(bool isTopLevel);
  421. extern void RegisterXactCallback(XactCallback callback, void *arg);
  422. extern void UnregisterXactCallback(XactCallback callback, void *arg);
  423. extern void RegisterSubXactCallback(SubXactCallback callback, void *arg);
  424. extern void UnregisterSubXactCallback(SubXactCallback callback, void *arg);
  425. extern bool IsSubxactTopXidLogPending(void);
  426. extern void MarkSubxactTopXidLogged(void);
  427. extern int xactGetCommittedChildren(TransactionId **ptr);
  428. extern XLogRecPtr XactLogCommitRecord(TimestampTz commit_time,
  429. int nsubxacts, TransactionId *subxacts,
  430. int nrels, RelFileNode *rels,
  431. int nstats,
  432. xl_xact_stats_item *stats,
  433. int nmsgs, SharedInvalidationMessage *msgs,
  434. bool relcacheInval,
  435. int xactflags,
  436. TransactionId twophase_xid,
  437. const char *twophase_gid);
  438. extern XLogRecPtr XactLogAbortRecord(TimestampTz abort_time,
  439. int nsubxacts, TransactionId *subxacts,
  440. int nrels, RelFileNode *rels,
  441. int nstats,
  442. xl_xact_stats_item *stats,
  443. int xactflags, TransactionId twophase_xid,
  444. const char *twophase_gid);
  445. extern void xact_redo(XLogReaderState *record);
  446. /* xactdesc.c */
  447. extern void xact_desc(StringInfo buf, XLogReaderState *record);
  448. extern const char *xact_identify(uint8 info);
  449. /* also in xactdesc.c, so they can be shared between front/backend code */
  450. extern void ParseCommitRecord(uint8 info, xl_xact_commit *xlrec, xl_xact_parsed_commit *parsed);
  451. extern void ParseAbortRecord(uint8 info, xl_xact_abort *xlrec, xl_xact_parsed_abort *parsed);
  452. extern void ParsePrepareRecord(uint8 info, xl_xact_prepare *xlrec, xl_xact_parsed_prepare *parsed);
  453. extern void EnterParallelMode(void);
  454. extern void ExitParallelMode(void);
  455. extern bool IsInParallelMode(void);
  456. #endif /* XACT_H */