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-21 03:40:55
Message-ID: CAA4eK1LUbXXUCQ6f8OEdbeoS+qVY3aE+MtMV=Y-oGgLw74V2ug@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Wed, Oct 20, 2021 at 8:49 PM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
>
> On Wed, Oct 20, 2021 at 7:09 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> >
> > Does MarkTopTransactionIdLogged() have to be inside XLogInsertRecord's
> > critical section?
>
> I think this function is doing somewhat similar things to what we are
> doing in MarkCurrentTransactionIdLoggedIfAny() so put at the same
> place. But I don't see any reason for this to be in the critical
> section.
>

Yeah, I also don't see any reason for this to be in the critical
section but it might be better to keep both together. So, if we want
to keep MarkTopTransactionIdLogged() out of the critical section in
this patch then we should move the existing function
MarkCurrentTransactionIdLoggedIfAny() in a separate patch so that
future readers doesn't get confused as to why one of these is in the
critical section and other is not. OTOH, we can move
MarkCurrentTransactionIdLoggedIfAny() out of the critical section in
this patch itself but that appears like an unrelated change and we may
or may not want to back-patch the same.

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2021-10-21 04:58:22 pgsql: Back-patch "Add parent table name in an error in reorderbuffer.c
Previous Message Dilip Kumar 2021-10-21 03:10:12 Re: pgsql: Document XLOG_INCLUDE_XID a little better

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2021-10-21 03:56:15 Re: Data is copied twice when specifying both child and parent table in publication
Previous Message Peter Geoghegan 2021-10-21 03:35:41 Re: [PATCH] Fix memory corruption in pg_shdepend.c