Re: Improve description of XLOG_RUNNING_XACTS

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: sawada(dot)mshk(at)gmail(dot)com
Cc: 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-09 07:02:01
Message-ID: 20220909.160201.1748687893154909440.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Fri, 9 Sep 2022 09:48:05 +0900, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote in
> On Tue, Aug 23, 2022 at 11:53 AM Kyotaro Horiguchi
> <horikyota(dot)ntt(at)gmail(dot)com> wrote:
> >
> > At Mon, 15 Aug 2022 11:16:56 +0900, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote in
> > > Or we can output the "subxid overwlowed" first.
> >
> > (I prefer this, as that doesn't change the output in the normal case
> > but the anormality will be easilly seen if happens.)
> >
>
> Updated the patch accordingly.

Thanks! Considering the discussion so far, how about adding a comment
like this?

+ appendStringInfoString(buf, "; subxid overflowed");
+
++ /*
++ * subxids and subxid_overflow are mutually exclusive, but we deliberitely
++ * print the both simultaneously in case the record is broken.
++ */
+ if (xlrec->subxcnt > 0)
+ {
+ appendStringInfo(buf, "; %d subxacts:", xlrec->subxcnt);
+ for (i = 0; i < xlrec->subxcnt; i++)
+ appendStringInfo(buf, " %u", xlrec->xids[xlrec->xcnt + i]);
+ }

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2022-09-09 07:02:16 Re: Perform streaming logical transactions by background workers and parallel apply
Previous Message Bharath Rupireddy 2022-09-09 06:44:25 Re: Switching XLog source from archive to streaming when primary available