Re: pgsql: Document XLOG_INCLUDE_XID a little better

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: Document XLOG_INCLUDE_XID a little better
Date: 2021-10-02 10:46:31
Message-ID: CAFiTN-ssWF6X7mGrjpvQ+yg7FbPFfGBBfb4npc8ZL_J8yKyF=w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Fri, Oct 1, 2021 at 6:24 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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

Attachment Content-Type Size
0001-Refactor-code-for-logging-the-top-transaction-id-in-Approach2.patch text/x-patch 7.9 KB
0001-Refactor-code-for-logging-the-top-transaction-id-in-Approach1.patch text/x-patch 6.4 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2021-10-02 14:40:10 Re: pgsql: Document XLOG_INCLUDE_XID a little better
Previous Message Michael Paquier 2021-10-02 08:41:02 pgsql: pg_stat_statements: Add some tests for older versions still usab

Browse pgsql-hackers by date

  From Date Subject
Next Message PG Bug reporting form 2021-10-02 11:00:02 BUG #17212: pg_amcheck fails on checking temporary relations
Previous Message Andreas Karlsson 2021-10-02 10:22:16 Re: pgcrypto support for bcrypt $2b$ hashes