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

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(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-19 10:24:09
Message-ID: 63ad1368-18e2-8900-8443-524bdfb1bef5@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

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.

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

Attachment Content-Type Size
recovery_pause_test_v2.patch text/plain 3.2 KB
remove_unnecessary_hires_usleep_v1.patch text/plain 359 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message osumi.takamichi@fujitsu.com 2021-05-19 10:32:04 Deadlock concern caused by TRUNCATE on user_catalog_table in synchronous mode
Previous Message Peter Eisentraut 2021-05-19 10:09:35 Re: libpq_pipeline in tmp_install