Re: recovery_target_action=pause with confusing hint

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Sergei Kornilov <sk(at)zsrv(dot)org>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: recovery_target_action=pause with confusing hint
Date: 2020-01-30 17:00:21
Message-ID: 4be18679-df39-f2fc-13f9-d73820cd6945@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020/01/30 20:00, Sergei Kornilov wrote:
> Hello
>
> Currently during point-in-time recovery with recovery_target_action = 'pause' we print log lines:
>
>> LOG: recovery has paused
>> HINT: Execute pg_wal_replay_resume() to continue.
>
> My colleague told me that this is a terrible moment: to continue what exactly? It sounds like "to continue replay", similar to normal pg_wal_replay_pause/pg_wal_replay_resume behavior. We have just small note in documentation:
>
>> The paused state can be resumed by using pg_wal_replay_resume() (see Table 9.81), which then causes recovery to end.
>
> But I think this is important place and can be improved.
>
> Also the database does not respond to the promote signals at this stage. Attached patch 0001 with the test will fail.
>
> 0002 patch contains my proposed ideas:
> - introduce separate message for pause due pg_wal_replay_pause call and for recovery_target_action.

+1

> - check for standby triggers only for recovery_target_action - I am not sure this would be safe for pg_wal_replay_pause() call case

Agreed. Basically I think that recoveryPausesHere() should the promotion
trigger whether recovery target is reached or not. But one question is;
how should the recovery behave if recovery target is reached with
recovery_target_action=pause after the promotion is requested?
It should pause? Or promote?

Regards,

--
Fujii Masao
NTT DATA CORPORATION
Advanced Platform Technology Group
Research and Development Headquarters

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Banck 2020-01-30 17:11:22 [Patch] Make pg_checksums skip foreign tablespace directories
Previous Message Tom Lane 2020-01-30 16:46:24 Re: Data race in interfaces/libpq/fe-exec.c