Re: Standby accepts recovery_target_timeline setting?

Fujii Masao <masao.fujii@gmail.com>

From: Fujii Masao <masao.fujii@gmail.com>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, David Steele <david@pgmasters.net>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2019-09-29T16:36:55Z
Lists: pgsql-hackers

Attachments

On Sun, Sep 29, 2019 at 6:08 AM Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
>
> On 2019-09-28 19:45, Tom Lane wrote:
> > Maybe I'm misunderstanding, but I think that rather than adding error
> > checks that were not there before, the right path to fixing this is
> > to cause these settings to be ignored if we're doing crash recovery.
>
> That makes sense to me.

+1

> Something like this (untested)?

Yes, but ArchiveRecoveryRequested should be checked instead of
InArchiveRecovery, I think. Otherwise recovery targets would take effect
when recovery.signal is missing but backup_label exists. In this case,
InArchiveRecovery is set to true though ArchiveRecoveryRequested is
false because recovery.signal is missing.

With the attached patch, I checked that the steps that I described
upthread didn't reproduce the issue.

Regards,

-- 
Fujii Masao

Commits

  1. Make crash recovery ignore recovery_min_apply_delay setting.

  2. Make crash recovery ignore restore_command and recovery_end_command settings.

  3. Make crash recovery ignore recovery target settings.

  4. doc: Further clarify how recovery target parameters are applied

  5. doc: Add timeline as valid recovery target in standby.signal documentation