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-21 03:10:12 |
Message-ID: | CAFiTN-unqqM5o1Xwqr_2Xiy77vJ=UtEAV+CJbVc3DDDDvjGAXg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On Wed, Oct 20, 2021 at 9:46 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>
> On 2021-Oct-20, Dilip Kumar wrote:
>
> > On Wed, Oct 20, 2021 at 7:09 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>
> > > In IsTopTransactionIdLogPending(), I suggest to reorder the tests so
> > > that the faster ones are first -- or at least, the last one should be at
> > > the top, so in some cases we can return without additional function
> > > calls. I don't think it'd be extremely noticeable, but as Tom likes to
> > > say, a cycle shaved is a cycle earned.
> >
> > I don't think we can really move the last at top. Basically, we only
> > want to log the top transaction id if all the above check passes and
> > the top xid is not yet logged. For example, if the WAL level is not
> > logical then we don't want to log the top xid even if it is not yet
> > logged, similarly, if the current transaction is not a subtransaction
> > then also we don't want to log the top transaction.
>
> Well, I don't suggest to move it verbatim, but ISTM the code can be
> restructured so that we do that test first, and if we see that flag set
> to true, we don't have to consider any of the other tests. That flag
> can only be set true if we saw all the other checks pass in the same
> subtransaction, right?
Yeah you are right, I will change it.
--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2021-10-21 03:40:55 | Re: pgsql: Document XLOG_INCLUDE_XID a little better |
Previous Message | Amit Kapila | 2021-10-21 02:52:04 | pgsql: Remove unused wait events. |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2021-10-21 03:27:03 | Re: [PATCH] Fix memory corruption in pg_shdepend.c |
Previous Message | Masahiko Sawada | 2021-10-21 03:06:32 | Re: Skipping logical replication transactions on subscriber side |