Re: Improve description of XLOG_RUNNING_XACTS

2022-11-03 Thread Ian Lawrence Barwick
2022年11月2日(水) 15:24 Amit Kapila : > > On Tue, Nov 1, 2022 at 4:33 PM Amit Kapila wrote: > > > > On Tue, Nov 1, 2022 at 12:53 PM Michael Paquier wrote: > > > > > > On Mon, Oct 17, 2022 at 02:53:57PM +0900, Michael Paquier wrote: > > > > No objections from here if you want to go ahead with v3 and

Re: Improve description of XLOG_RUNNING_XACTS

2022-11-02 Thread Amit Kapila
On Tue, Nov 1, 2022 at 4:33 PM Amit Kapila wrote: > > On Tue, Nov 1, 2022 at 12:53 PM Michael Paquier wrote: > > > > On Mon, Oct 17, 2022 at 02:53:57PM +0900, Michael Paquier wrote: > > > No objections from here if you want to go ahead with v3 and print the > > > full set of subxids on top of

Re: Improve description of XLOG_RUNNING_XACTS

2022-11-01 Thread Amit Kapila
On Tue, Nov 1, 2022 at 12:53 PM Michael Paquier wrote: > > On Mon, Oct 17, 2022 at 02:53:57PM +0900, Michael Paquier wrote: > > No objections from here if you want to go ahead with v3 and print the > > full set of subxids on top of the information about these > > overflowing. > > While browsing

Re: Improve description of XLOG_RUNNING_XACTS

2022-11-01 Thread Michael Paquier
On Mon, Oct 17, 2022 at 02:53:57PM +0900, Michael Paquier wrote: > No objections from here if you want to go ahead with v3 and print the > full set of subxids on top of the information about these > overflowing. While browsing the CF entries, this was still listed. Amit, any updates? -- Michael

Re: Improve description of XLOG_RUNNING_XACTS

2022-10-16 Thread Michael Paquier
On Mon, Oct 17, 2022 at 09:58:31AM +0530, Amit Kapila wrote: > Okay, let's wait for two or three days and see if anyone thinks > differently, otherwise, I'll push v3 after a bit more testing. No objections from here if you want to go ahead with v3 and print the full set of subxids on top of the

Re: Improve description of XLOG_RUNNING_XACTS

2022-10-16 Thread Amit Kapila
On Mon, Oct 17, 2022 at 6:46 AM Kyotaro Horiguchi wrote: > > At Sun, 16 Oct 2022 12:32:56 +0530, Bharath Rupireddy > wrote in > > On Sat, Oct 15, 2022 at 4:58 PM Amit Kapila wrote: > > > > > > > I spent some time today reading this. As others said upthread, the > > > > output can be more

Re: Improve description of XLOG_RUNNING_XACTS

2022-10-16 Thread Kyotaro Horiguchi
At Sun, 16 Oct 2022 12:32:56 +0530, Bharath Rupireddy wrote in > On Sat, Oct 15, 2022 at 4:58 PM Amit Kapila wrote: > > > > > I spent some time today reading this. As others said upthread, the > > > output can be more verbose if all the backends are running max > > > subtransactions or

Re: Improve description of XLOG_RUNNING_XACTS

2022-10-16 Thread Bharath Rupireddy
On Sat, Oct 15, 2022 at 4:58 PM Amit Kapila wrote: > > > I spent some time today reading this. As others said upthread, the > > output can be more verbose if all the backends are running max > > subtransactions or subtransactions overflow occurred in all the > > backends. > > > > As far as I can

Re: Improve description of XLOG_RUNNING_XACTS

2022-10-15 Thread Amit Kapila
On Fri, Oct 14, 2022 at 3:38 PM Bharath Rupireddy wrote: > > On Mon, Oct 3, 2022 at 1:46 PM Michael Paquier wrote: > > > > On Fri, Sep 16, 2022 at 10:55:53AM +0900, Kyotaro Horiguchi wrote: > > > Putting an arbitrary upper-bound on the number of subxids to print > > > might work? I'm not sure

Re: Improve description of XLOG_RUNNING_XACTS

2022-10-14 Thread Bharath Rupireddy
On Mon, Oct 3, 2022 at 1:46 PM Michael Paquier wrote: > > On Fri, Sep 16, 2022 at 10:55:53AM +0900, Kyotaro Horiguchi wrote: > > Putting an arbitrary upper-bound on the number of subxids to print > > might work? I'm not sure how we can determine the upper-bound, though. > > You could hardcode it

Re: Improve description of XLOG_RUNNING_XACTS

2022-10-03 Thread Masahiko Sawada
On Mon, Oct 3, 2022 at 5:15 PM Michael Paquier wrote: > > On Fri, Sep 16, 2022 at 10:55:53AM +0900, Kyotaro Horiguchi wrote: > > Putting an arbitrary upper-bound on the number of subxids to print > > might work? I'm not sure how we can determine the upper-bound, though. > > You could hardcode it

Re: Improve description of XLOG_RUNNING_XACTS

2022-10-03 Thread Michael Paquier
On Fri, Sep 16, 2022 at 10:55:53AM +0900, Kyotaro Horiguchi wrote: > Putting an arbitrary upper-bound on the number of subxids to print > might work? I'm not sure how we can determine the upper-bound, though. You could hardcode it so as it does not blow up the whole view, say 20~30. Anyway, I

Re: Improve description of XLOG_RUNNING_XACTS

2022-09-15 Thread Kyotaro Horiguchi
At Thu, 15 Sep 2022 17:39:17 +0530, Amit Kapila wrote in > 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

Re: Improve description of XLOG_RUNNING_XACTS

2022-09-15 Thread Amit Kapila
On Thu, Sep 15, 2022 at 1:26 PM Masahiko Sawada wrote: > > On Wed, Sep 14, 2022 at 6:33 PM Amit Kapila wrote: > > > > On Fri, Sep 9, 2022 at 6:18 AM Masahiko Sawada > > wrote: > > > > > > Updated the patch accordingly. > > > > > > > I have created two xacts each with savepoints and after your

Re: Improve description of XLOG_RUNNING_XACTS

2022-09-15 Thread Masahiko Sawada
On Wed, Sep 14, 2022 at 6:33 PM Amit Kapila wrote: > > On Fri, Sep 9, 2022 at 6:18 AM Masahiko Sawada 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:

Re: Improve description of XLOG_RUNNING_XACTS

2022-09-14 Thread Amit Kapila
On Fri, Sep 9, 2022 at 6:18 AM Masahiko Sawada 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:

Re: Improve description of XLOG_RUNNING_XACTS

2022-09-09 Thread Kyotaro Horiguchi
At Fri, 9 Sep 2022 09:48:05 +0900, Masahiko Sawada wrote in > On Tue, Aug 23, 2022 at 11:53 AM Kyotaro Horiguchi > wrote: > > > > At Mon, 15 Aug 2022 11:16:56 +0900, Masahiko Sawada > > wrote in > > > Or we can output the "subxid overwlowed" first. > > > > (I prefer this, as that doesn't

Re: Improve description of XLOG_RUNNING_XACTS

2022-09-08 Thread Masahiko Sawada
On Tue, Aug 23, 2022 at 11:53 AM Kyotaro Horiguchi wrote: > > At Mon, 15 Aug 2022 11:16:56 +0900, Masahiko Sawada > wrote in > > Sorry for the late reply. > > No worries. Anyway I was in a long (as a Japanese:) vacation. > > > On Thu, Jul 28, 2022 at 4:29 PM Kyotaro Horiguchi > > wrote: > > >

Re: Improve description of XLOG_RUNNING_XACTS

2022-08-22 Thread Kyotaro Horiguchi
At Mon, 15 Aug 2022 11:16:56 +0900, Masahiko Sawada wrote in > Sorry for the late reply. No worries. Anyway I was in a long (as a Japanese:) vacation. > On Thu, Jul 28, 2022 at 4:29 PM Kyotaro Horiguchi > wrote: > > record is sound". Is it any trouble with assuming the both *can* > > happen

Re: Improve description of XLOG_RUNNING_XACTS

2022-08-14 Thread Masahiko Sawada
Sorry for the late reply. On Thu, Jul 28, 2022 at 4:29 PM Kyotaro Horiguchi wrote: > > At Thu, 28 Jul 2022 15:53:33 +0900, Masahiko Sawada > wrote in > > > > > Do you mean that both could be true at the same time? If I read > > GetRunningTransactionData() correctly, that doesn't happen. > >

Re: Improve description of XLOG_RUNNING_XACTS

2022-07-28 Thread Kyotaro Horiguchi
At Thu, 28 Jul 2022 15:53:33 +0900, Masahiko Sawada wrote in > > > Do you mean that both could be true at the same time? If I read > GetRunningTransactionData() correctly, that doesn't happen. So, I wrote "since it is debugging output", and "fine if we asuume the record is sound". Is it any

Re: Improve description of XLOG_RUNNING_XACTS

2022-07-28 Thread Masahiko Sawada
On Thu, Jul 28, 2022 at 3:24 PM Kyotaro Horiguchi wrote: > > At Thu, 28 Jul 2022 09:56:33 +0530, Ashutosh Bapat > wrote in > > Thanks Masahiko for the updated patch. It looks good to me. > > > > I wonder whether the logic should be, similar > > to ProcArrayApplyRecoveryInfo() > > if

Re: Improve description of XLOG_RUNNING_XACTS

2022-07-28 Thread Kyotaro Horiguchi
At Thu, 28 Jul 2022 09:56:33 +0530, Ashutosh Bapat wrote in > Thanks Masahiko for the updated patch. It looks good to me. > > I wonder whether the logic should be, similar > to ProcArrayApplyRecoveryInfo() > if (xlrec->subxid_overflow) > ... > else if (xlrec->subxcnt > 0) > ... > > But you

Re: Improve description of XLOG_RUNNING_XACTS

2022-07-27 Thread Ashutosh Bapat
Thanks Masahiko for the updated patch. It looks good to me. I wonder whether the logic should be, similar to ProcArrayApplyRecoveryInfo() if (xlrec->subxid_overflow) ... else if (xlrec->subxcnt > 0) ... But you may ignore it. -- Best Wishes, Ashutosh On Thu, Jul 28, 2022 at 7:41 AM Masahiko

Re: Improve description of XLOG_RUNNING_XACTS

2022-07-27 Thread Masahiko Sawada
On Thu, Jul 21, 2022 at 10:13 PM Ashutosh Bapat wrote: > > Hi > > On Thu, Jul 21, 2022 at 6:44 AM 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 > >

Re: Improve description of XLOG_RUNNING_XACTS

2022-07-21 Thread Ashutosh Bapat
Hi On Thu, Jul 21, 2022 at 6:44 AM 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. Here is an example by pg_wlaldump: > > * HEAD > rmgr: Standby len

Re: Improve description of XLOG_RUNNING_XACTS

2022-07-21 Thread Kyotaro Horiguchi
At Thu, 21 Jul 2022 16:58:45 +0900, Masahiko Sawada wrote in > > > The patch looks good to me. By the way +1 to this. > > 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

Re: Improve description of XLOG_RUNNING_XACTS

2022-07-21 Thread Masahiko Sawada
On Thu, Jul 21, 2022 at 4:29 PM Kyotaro Horiguchi wrote: > > At Thu, 21 Jul 2022 11:21:09 +0900, Fujii Masao > 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

Re: Improve description of XLOG_RUNNING_XACTS

2022-07-21 Thread Kyotaro Horiguchi
At Thu, 21 Jul 2022 11:21:09 +0900, Fujii Masao 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 > >

Re: Improve description of XLOG_RUNNING_XACTS

2022-07-20 Thread Fujii Masao
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. Regards, -- Fujii Masao Advanced Computing Technology