Re: File system level backup of shut down standby does not work? - Mailing list pgsql-general

From Jürgen Fuchsberger
Subject Re: File system level backup of shut down standby does not work?
Date
Msg-id 5304AFA1.3030901@uni-graz.at
Whole thread Raw
In response to Re: File system level backup of shut down standby does not work?  (Albe Laurenz <laurenz.albe@wien.gv.at>)
List pgsql-general

On 02/19/2014 11:43 AM, Albe Laurenz wrote:
> Jürgen Fuchsberger wrote:
>> One very important thing I just noted when shutting down and restarting
>> my standby server:
>>
>> My standby server *always needs the last WAL-file* from the archive
>> directory, even when the shut down was "smart". Without this the
>> consistent recovery state will not be reached.
>>
>> 2014-02-19 11:10:20 CET LOG:  received smart shutdown request
>> 2014-02-19 11:10:20 CET LOG:  shutting down
>> 2014-02-19 11:10:20 CET LOG:  database system is shut down
>> 2014-02-19 11:11:00 CET LOG:  database system was shut down in recovery
>> at 2014-
>> 02-19 11:10:20 CET
>> 2014-02-19 11:11:00 CET LOG:  entering standby mode
>> 2014-02-19 11:11:00 CET LOG:  incomplete startup packet
>> 2014-02-19 11:11:01 CET FATAL:  the database system is starting up
>>
>> *2014-02-19 11:11:01 CET LOG:  restored log file*
>> *"00000001000002DE000000BF" from archive*
>>
>> 2014-02-19 11:11:01 CET LOG:  redo starts at 2DE/BF036FA4
>> 2014-02-19 11:11:01 CET FATAL:  the database system is starting up
>> 2014-02-19 11:11:01 CET LOG:  consistent recovery state reached at
>> 2DE/BFFFE53C
>> 2014-02-19 11:11:01 CET LOG:  database system is ready to accept read
>> only connections
>>
>> So my question is, could there be something wrong with my configuration
>> or is this normal?
>
> As far as I can tell, that is as expected:
>
> Upon restart, the recovery process will continue from the last restart point.
> So if the restart point happened after replay of WAL record X in WAL
> file Y, the recovery process will need WAL file Y again to replay
> X+1 and the following records.
>
> Yours,
> Laurenz Albe
>
OK, so it is important to back up the WAL archive dir too to have a
consistent backup. This was not that clear to me and
https://wiki.postgresql.org/wiki/Incrementally_Updated_Backups
does not mention the WAL archive dir neither. I might update the Wiki entry.

Best,
Juergen



Attachment

pgsql-general by date:

Previous
From: "Antman, Jason (CMG-Atlanta)"
Date:
Subject: Re: File system level backup of shut down standby does not work?
Next
From: Tjibbe
Date:
Subject: why VARIADIC functions executed on array input?