Re: BUG #13977: Strange behavior with WAL archive recovery

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Oleksii Kliukin <alexk(at)hintbits(dot)com>
Cc: eshkinkot(at)gmail(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #13977: Strange behavior with WAL archive recovery
Date: 2016-02-26 07:16:34
Message-ID: CAB7nPqQpGgv7z1ss0=zAvJ3TshsEL0x+4rBf4HSFK0JqmSBCSA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Feb 25, 2016 at 12:54 AM, Oleksii Kliukin <alexk(at)hintbits(dot)com> wrote:
>> On 22 Feb 2016, at 15:31, eshkinkot(at)gmail(dot)com wrote:
>> 2016-02-22 17:23:16.983 MSK pid=19436,user=,db=,host= LOG: restored log file
>> "00000001000074A7000000C4" from archive
>> 2016-02-22 17:23:17.119 MSK pid=19436,user=,db=,host= LOG: unexpected
>> pageaddr 74A4/C8000000 in log segment 00000001000074A7000000C5, offset 0

[...]

>> 2016-02-22 17:23:21.189 MSK pid=19436,user=,db=,host= LOG: restored log file
>> "00000001000074A7000000C7" from archive
>> 2016-02-22 17:23:21.361 MSK pid=19436,user=,db=,host= LOG: unexpected
>> pageaddr 74A4/D5000000 in log segment 00000001000074A7000000C8, offset 0

Those two entries are weird. A segment has been restored, but then a
complain comes from segment+1 in the error context given here. Looking
at xlogreader.c there is no one-off kind of problems in the reader
machinery.

>> 2016-02-22 17:23:25.527 MSK pid=19436,user=,db=,host= LOG: restored log file
>> "00000001000074A7000000C7" from archive
>> [...]
>> 2016-02-22 17:23:30.695 MSK pid=19436,user=,db=,host= LOG: restored log file
>> "00000001000074A7000000C7" from archive
>
> I think it’s expected. PostgreSQL reports the latest file it has restored, meaning that once it restored 00000001000074A7000000C7 it was not able to get the following one (presumably, 00000001000074A7000000C8, unless there was a timeline change).

This error message is reported by Postgres once a segment is being
correctly restored in pg_xlog and that it is found to have a correct
size. What is actually restore_cmd doing?
--
Michael

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Dean Rasheed 2016-02-26 08:27:20 Re: BUG #13988: "plan should not reference subplan's variable" whilst using row level security
Previous Message Michael Paquier 2016-02-26 01:44:36 Re: BUG #13990: Postgres shutting down automatically