Re: Improve description of XLOG_RUNNING_XACTS

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, ashutosh(dot)bapat(at)enterprisedb(dot)com, ashutosh(dot)bapat(dot)oss(at)gmail(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Improve description of XLOG_RUNNING_XACTS
Date: 2022-09-15 07:55:37
Message-ID: CAD21AoB2bkQE49es86re2z9wtJ3v=vQ2Ay=43fs_t9CetgArhQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 14, 2022 at 6:33 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Fri, Sep 9, 2022 at 6:18 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ibrar Ahmed 2022-09-15 08:02:17 Re: Add parameter jit_warn_above_fraction
Previous Message John Naylor 2022-09-15 07:09:44 Re: New strategies for freezing, advancing relfrozenxid early