Re: Improve description of XLOG_RUNNING_XACTS

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(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 12:09:17
Message-ID: CAA4eK1+4_VJJ4FZFo3hA6pWpwAXwmzFVBSxW7uNKyX4_xA_BfA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 15, 2022 at 1:26 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>
> 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.
>

I see your point but I am still worried due to the concern raised by
Horiguchi-San earlier in this thread that the total number could be as
large as TOTAL_MAX_CACHED_SUBXIDS. I think if we want to include
information only on the number of subxacts then that is clearly an
improvement without any disadvantage.

Does anyone else have an opinion on this matter?

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ajin Cherian 2022-09-15 12:38:19 Re: Support logical replication of DDLs
Previous Message Amit Kapila 2022-09-15 11:39:45 Re: Perform streaming logical transactions by background workers and parallel apply