Re: pgsql: Document XLOG_INCLUDE_XID a little better
Dilip Kumar <dilipbalaut@gmail.com>
From: Dilip Kumar <dilipbalaut@gmail.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Amit Kapila <amit.kapila16@gmail.com>,
Robert Haas <robertmhaas@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-10-02T10:46:31Z
Lists: pgsql-hackers
Attachments
- 0001-Refactor-code-for-logging-the-top-transaction-id-in-Approach2.patch (text/x-patch) patch 0001
- 0001-Refactor-code-for-logging-the-top-transaction-id-in-Approach1.patch (text/x-patch) patch 0001
On Fri, Oct 1, 2021 at 6:24 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote: > > On 2021-Oct-01, Amit Kapila wrote: > I think a straight standalone variable (probably a static boolean in > xloginsert.c) might be less confusing. I have written two patches, Approach1 is as you described using a static boolean and Approach2 as a local variable to XLogAssembleRecord as described by Amit, attached both of them for your reference. IMHO, either of these approaches looks cleaner. > > ... so, reading the xact.c code again, TransactionState->assigned really > means "whether the subXID-to-topXID association has been wal-logged", > which is a completely different meaning from what the term 'assigned' > means in all other comments in xact.c ... and I think the subroutine > name MarkSubTransactionAssigned() is not a great choice either. I have also renamed the variable and functions as per the actual usage. -- Regards, Dilip Kumar EnterpriseDB: http://www.enterprisedb.com
Commits
-
Move MarkCurrentTransactionIdLoggedIfAny() out of the critical section.
- 335397456b7e 15.0 landed
-
Replace XLOG_INCLUDE_XID flag with a more localized flag.
- 71db6459e6e4 15.0 landed
-
Document XLOG_INCLUDE_XID a little better
- c1d1ae1db237 14.0 cited
- ade24dab97a2 15.0 cited
-
Immediately WAL-log subtransaction and top-level XID association.
- 0bead9af484c 14.0 cited