Re: pgsql: Document XLOG_INCLUDE_XID a little better

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, 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-18 05:17:56
Message-ID: CAA4eK1+1BPyBK1KAEkzwpm+2nH4i1_xVm-WTgjd+gpxA_kT4SA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Thu, Oct 7, 2021 at 10:46 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Sat, Oct 2, 2021 at 4:16 PM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
> >
> > 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.
> >
>
> I have tried to improve some comments and a variable name in the
> Approach-2 (use local variable) patch and also reverts one of the
> comments introduced by the commit ade24dab97. I am fine if we decide
> to go with Approach-1 as well but personally, I would prefer to keep
> the code consistent with nearby code.
>
> Let me know what you think of the attached?
>

Today, I have looked at this patch again and slightly changed a
comment, one of the function name and variable name. Do, let me know
if you or others have any suggestions for better names or otherwise? I
think we should backpatch this to 14 as well where this code was
introduced.

--
With Regards,
Amit Kapila.

Attachment Content-Type Size
v3-0001-Replace-XLOG_INCLUDE_XID-flag-with-a-more-localiz.patch application/octet-stream 10.5 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2021-10-18 12:15:08 pgsql: Refactor LogicalTapeSet/LogicalTape interface.
Previous Message Michael Paquier 2021-10-18 02:57:52 pgsql: Reset properly snapshot export state during transaction abort

Browse pgsql-hackers by date

  From Date Subject
Next Message Amul Sul 2021-10-18 05:26:53 Re: using an end-of-recovery record in all cases
Previous Message Justin Pryzby 2021-10-18 04:21:28 Re: prion failed with ERROR: missing chunk number 0 for toast value 14334 in pg_toast_2619