Re: [BUG] pg_basebackup from disconnected standby fails - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: [BUG] pg_basebackup from disconnected standby fails
Date
Msg-id CAA4eK1+w8_hQOSpWHAhNdY8mMHyG62TJgyfSgs08tow8LFHD5A@mail.gmail.com
Whole thread Raw
In response to Re: [BUG] pg_basebackup from disconnected standby fails  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: [BUG] pg_basebackup from disconnected standby fails  (Michael Paquier <michael.paquier@gmail.com>)
Re: [BUG] pg_basebackup from disconnected standby fails  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On Mon, Oct 24, 2016 at 12:25 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> On Mon, Oct 24, 2016 at 1:39 PM, Amit Kapila <amit.kapila16@gmail.com> wrote:
>>
>> I think what you are saying is not completely right, because we do
>> update minRecoveryPoint when we don't perform a new restart point.
>> When we perform restart point, then it assumes that flushing the
>> buffers will take care of updating minRecoveryPoint.
>
> Yep, minRecoveryPoint still gets updated when the last checkpoint
> record is the last restart point to avoid a hot standby to allow
> read-only connections at a LSN-point earlier than the last shutdown.
> Anyway, we can clearly reject 1. in the light of
> https://www.postgresql.org/message-id/CAA4eK1KmjtsXqF0cav7Cs4d4vwv2H_pc8d8q1BUCqDzAF+7EzQ@mail.gmail.com
> when playing with different stop locations at recovery.
>

That point holds good only for cases when we try to update minimum
recovery point beyond what is required (like earlier we were thinking
to update it unconditionally), however what is being discussed here is
to update only if it is not updated by flush of buffers.  I think that
is okay, but I feel Kyotaro-San's fix is a good fix for the problem
and we don't need to add some more code (additional update of control
file) to fix the problem.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [BUG] pg_basebackup from disconnected standby fails
Next
From: "Karl O. Pinc"
Date:
Subject: Re: Patch to implement pg_current_logfile() function