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

From Kyotaro Horiguchi
Subject Re: Improve description of XLOG_RUNNING_XACTS
Date
Msg-id 20220909.160201.1748687893154909440.horikyota.ntt@gmail.com
Whole thread Raw
In response to Improve description of XLOG_RUNNING_XACTS  (Masahiko Sawada <sawada.mshk@gmail.com>)
List pgsql-hackers
At Fri, 9 Sep 2022 09:48:05 +0900, Masahiko Sawada <sawada.mshk@gmail.com> wrote in 
> On Tue, Aug 23, 2022 at 11:53 AM Kyotaro Horiguchi
> <horikyota.ntt@gmail.com> wrote:
> >
> > At Mon, 15 Aug 2022 11:16:56 +0900, Masahiko Sawada <sawada.mshk@gmail.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



pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: Switching XLog source from archive to streaming when primary available
Next
From: Peter Smith
Date:
Subject: Re: Perform streaming logical transactions by background workers and parallel apply