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 CAD21AoDpy2nVJ6wq=qUnZqPoMhcRjYWQ=nyCNNTV+1MVzq=KWg@mail.gmail.com
Whole thread Raw
In response to Re: Improve description of XLOG_RUNNING_XACTS  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: Improve description of XLOG_RUNNING_XACTS
List pgsql-hackers
On Thu, Jul 21, 2022 at 4:29 PM Kyotaro Horiguchi
<horikyota.ntt@gmail.com> wrote:
>
> At Thu, 21 Jul 2022 11:21:09 +0900, Fujii Masao <masao.fujii@oss.nttdata.com> wrote in
> >
> >
> > On 2022/07/21 10:13, Masahiko Sawada wrote:
> > > Hi,
> > > I realized that standby_desc_running_xacts() in standbydesc.c doesn't
> > > describe subtransaction XIDs. I've attached the patch to improve the
> > > description.
> >
> > +1
> >
> > The patch looks good to me.
>
> The subxids can reach TOTAL_MAX_CACHED_SUBXIDS =
> PGPROC_MAX_CACHED_SUBXIDS(=64) * PROCARRAY_MAXPROCS. xact_desc_commit
> also shows subtransactions but they are at maximum 64.  I feel like
> -0.3 if there's no obvious advantage showing them.

xxx_desc() functions are debugging purpose functions as they are used
by pg_waldump and pg_walinspect etc. I think such functions should
show all contents unless there is reason to hide them. Particularly,
standby_desc_running_xacts() currently shows subtransaction
information only when subtransactions are overflowed, which got me
confused when inspecting WAL records.

Regards,

-- 
Masahiko Sawada
EDB:  https://www.enterprisedb.com/



pgsql-hackers by date:

Previous
From: Richard Guo
Date:
Subject: Re: Pulling up direct-correlated ANY_SUBLINK
Next
From: Thomas Munro
Date:
Subject: Re: Remove fls(), use pg_bitutils.h facilities instead?