Re: Improve description of XLOG_RUNNING_XACTS - Mailing list pgsql-hackers

From Masahiko Sawada
Subject Re: Improve description of XLOG_RUNNING_XACTS
Date
Msg-id CAD21AoB2bkQE49es86re2z9wtJ3v=vQ2Ay=43fs_t9CetgArhQ@mail.gmail.com
Whole thread Raw
In response to Re: Improve description of XLOG_RUNNING_XACTS  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Improve description of XLOG_RUNNING_XACTS
List pgsql-hackers
On Wed, Sep 14, 2022 at 6:33 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Fri, Sep 9, 2022 at 6:18 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
> >
> > Updated the patch accordingly.
> >
>
> I have created two xacts each with savepoints and after your patch,
> the record will show xacts/subxacts information as below:
>
> rmgr: Standby     len (rec/tot):     74/    74, tx:          0, lsn:
> 0/014AC238, prev 0/014AC1F8, desc: RUNNING_XACTS nextXid 733
> latestCompletedXid 726 oldestRunningXid 727; 2 xacts: 729 727; 4
> subxacts: 730 731 728 732
>
> There is no way to associate which subxacts belong to which xact, so
> will it be useful, and if so, how? I guess we probably don't need it
> here because the describe records just display the record information.

I think it's useful for debugging purposes. For instance, when I was
working on the fix 68dcce247f1a13318613a0e27782b2ca21a4ceb7
(REL_14_STABLE), I checked if all initial running transactions
including subtransactions are properly stored and purged by checking
the debug logs and pg_waldump output. Actually, until I realize that
the description of RUNNING_XACTS doesn't show subtransaction
information, I was confused by the fact that the saved initial running
transactions didn't match the description shown by pg_waldump.

Regards,

-- 
Masahiko Sawada
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: New strategies for freezing, advancing relfrozenxid early
Next
From: Ibrar Ahmed
Date:
Subject: Re: Add parameter jit_warn_above_fraction