public inbox for [email protected]
help / color / mirror / Atom feedFrom: Xuneng Zhou <[email protected]>
To: Alexander Korotkov <[email protected]>
Cc: Michael Paquier <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: Re: test: avoid redundant standby catchup in 049_wait_for_lsn
Date: Mon, 20 Apr 2026 21:54:16 +0800
Message-ID: <CABPTF7UNdY_dSqTzEvXOLkQa8Fr3-j-VTyQGEgMhnwfzNuu0Fg@mail.gmail.com> (raw)
In-Reply-To: <CAPpHfdu47tAB1s1q8s4Qy1wZ9jKTA46cjQGRTugMb_5mze8fbQ@mail.gmail.com>
References: <CABPTF7WZ1yuYz8V=xsbghg8e7qaAm5MpyNw6BthWcbN7+P6biw@mail.gmail.com>
<[email protected]>
<CABPTF7VouG5DSvdgPSg1ko6ybHhNPQk5sxJQMiy8r_gr_bEtug@mail.gmail.com>
<CAPpHfdvSgasQ3XeTAbA=cqH_BVY9pD6BVuXj+xEgyYGx2_nfEw@mail.gmail.com>
<CAPpHfdu47tAB1s1q8s4Qy1wZ9jKTA46cjQGRTugMb_5mze8fbQ@mail.gmail.com>
On Mon, Apr 20, 2026 at 6:21 PM Alexander Korotkov <[email protected]> wrote:
>
> On Sat, Apr 18, 2026 at 10:58 AM Alexander Korotkov
> <[email protected]> wrote:
> > On Sat, Apr 18, 2026 at 7:20 AM Xuneng Zhou <[email protected]> wrote:
> > >> On Fri, Apr 17, 2026 at 08:25:35PM +0800, Xuneng Zhou wrote:
> > >> > The change preserves the same coverage while removing one redundant
> > >> > replay catch-up on the delayed standby. It appears to reduce the test
> > >> > runtime by about 7 seconds, though I have looked into why much of the
> > >> > improvement comes from this change alone.
> > >>
> > >> Alexander may think differently and remove that, but I disagree. The
> > >> test is clearly written so as we want two wait checks to happen, for
> > >> for CREATE FUNCTION, and one for CREATE PROCEDURE. Removing the first
> > >> check to keep only the second one removes its meaning. In short, I
> > >> see nothing wrong to deal with here.
> > >
> > >
> > > Thank you for the review. I agree that the two wait checks serve distinct purposes and are not redundant. The main motivation for this patch was efficiency. In my testing, the new test added approximately 7 seconds to the runtime, while the creation of the procedure and function completed quickly. I suspect the latency stems from the wait-for-catch-up step. When I removed it, the test runtime dropped by about 7 seconds.I haven't yet investigated why the wait is so costly in this case. I should probably look into that before proposing this change.
> >
> > On my laptop the time needed to run t/049_wait_for_lsn.pl also drops
> > from 20 secs to 12 secs. The influence to the runtime of the whole
> > test suite in parallel would be not that big as CPU time only drops
> > from 2.16 sec to 2.07 sec. But anyway that's pretty significant.
> > I've revised comment message a bit and surrounding comments. I'm
> > going to push this if no objections.
>
> Pushed.
>
Thanks for pushing it. I haven't had time to investigate the latency
yet, but will do it later.
Best,
Xuneng
view thread (7+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: test: avoid redundant standby catchup in 049_wait_for_lsn
In-Reply-To: <CABPTF7UNdY_dSqTzEvXOLkQa8Fr3-j-VTyQGEgMhnwfzNuu0Fg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox