Re: Standby accepts recovery_target_timeline setting? - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Standby accepts recovery_target_timeline setting?
Date
Msg-id CAHGQGwFxZOP_V_udboLm=0g8UHN195GYa_bc9jchx_Ui47812g@mail.gmail.com
Whole thread Raw
In response to Re: Standby accepts recovery_target_timeline setting?  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: Standby accepts recovery_target_timeline setting?
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: Connections hang indefinitely while taking a gin index's LWLockbuffer_content lock(PG10.7)
Next
From: Alvaro Herrera
Date:
Subject: Re: PATCH: logical_work_mem and logical streaming of largein-progress transactions