Re: pg_get_wal_replay_pause_state() should not return 'paused' while a promotion is ongoing.

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: masao(dot)fujii(at)oss(dot)nttdata(dot)com
Cc: dilipbalaut(at)gmail(dot)com, michael(at)paquier(dot)xyz, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_get_wal_replay_pause_state() should not return 'paused' while a promotion is ongoing.
Date: 2021-05-31 08:18:42
Message-ID: 20210531.171842.1230966476067802582.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Sorry for missing this.

At Mon, 31 May 2021 12:52:54 +0900, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> wrote in
>
> On 2021/05/19 19:24, Fujii Masao wrote:
> > On 2021/05/19 16:43, Kyotaro Horiguchi wrote:
> >> +1 for adding some tests for pg_wal_replay_pause() but the test seems
> >> like checking only that pg_get_wal_replay_pause_state() returns the
> >> expected state value.  Don't we need to check that the recovery is
> >> actually paused and that the promotion happens at expected LSN?
> > Sounds good. Attached is the updated version of the patch.
> > I added such checks into the test.

Thanks! Looks fine. The paused-state test may get false-success but it
would be sufficient that it detects the problem in most cases.

> > BTW, while reading some recovery regression tests, I found that
> > 013_crash_restart.pl has "use Time::HiRes qw(usleep)" but it seems
> > not necessary. We can safely remove that? Patch attached.

Looks just fine for the removal of HiRes usage. All other use of
HiRes are accompanied by a usleep usage.

> Barring any objections, I'm thinking to commit these two patches.

+1.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhihong Yu 2021-05-31 08:36:22 Re: why is the permission granted in a non-recursive way and what are the benefits
Previous Message Kyotaro Horiguchi 2021-05-31 08:03:18 Re: Race condition in recovery?