1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-08 11:42:09 +03:00

Replace XLOG_INCLUDE_XID flag with a more localized flag.

Commit 0bead9af48 introduced XLOG_INCLUDE_XID flag to indicate that the
WAL record contains subXID-to-topXID association. It uses that flag later
to mark in CurrentTransactionState that top-xid is logged so that we
should not try to log it again with the next WAL record in the current
subtransaction. However, we can use a localized variable to pass that
information.

In passing, change the related function and variable names to make them
consistent with what the code is actually doing.

Author: Dilip Kumar
Reviewed-by: Alvaro Herrera, Amit Kapila
Discussion: https://postgr.es/m/E1mSoYz-0007Fh-D9@gemulon.postgresql.org
This commit is contained in:
Amit Kapila
2021-11-02 08:35:29 +05:30
parent 43a134f28b
commit 71db6459e6
5 changed files with 82 additions and 68 deletions

View File

@ -433,8 +433,8 @@ extern void UnregisterXactCallback(XactCallback callback, void *arg);
extern void RegisterSubXactCallback(SubXactCallback callback, void *arg);
extern void UnregisterSubXactCallback(SubXactCallback callback, void *arg);
extern bool IsSubTransactionAssignmentPending(void);
extern void MarkSubTransactionAssigned(void);
extern bool IsSubxactTopXidLogPending(void);
extern void MarkSubxactTopXidLogged(void);
extern int xactGetCommittedChildren(TransactionId **ptr);