Re: Confusing recovery message when target not hit - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Confusing recovery message when target not hit
Date
Msg-id CAB7nPqS5t9JgUvQMtKvGXHWV-u6eDGNRsQE50EyV=fVX9+1Big@mail.gmail.com
Whole thread Raw
In response to Re: Confusing recovery message when target not hit  (Thom Brown <thom@linux.com>)
List pgsql-hackers
On Mon, Jun 13, 2016 at 9:53 AM, Thom Brown <thom@linux.com> wrote:
> On 12 June 2016 at 12:51, Michael Paquier <michael.paquier@gmail.com> wrote:
>>
>> On Sun, Jun 12, 2016 at 7:52 PM, Thom Brown <thom@linux.com> wrote:
>> > Aren't those already set by recoveryStopsBefore()?
>>
>> It is possible to exit the main redo loop if a NULL record is found
>> after calling ReadRecord, in which case those would not be set, no?
>
>
> I'm apprehensive about initialising those values myself as I don't want to
> set them at a point where they may potentially already be set.

As your patch relies on checks on the variables holding the recovery
stop information as not being set, initializing them before entering
in the REDO phase (say just before 6435:xlog.c on HEAD) is the safest
thing to do IMO.
-- 
Michael



pgsql-hackers by date:

Previous
From: Tatsuro Yamada
Date:
Subject: Re: ERROR: ORDER/GROUP BY expression not found in targetlist
Next
From: Michael Paquier
Date:
Subject: Re: ERROR: ORDER/GROUP BY expression not found in targetlist