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

From Albe Laurenz
Subject Re: File system level backup of shut down standby does not work?
Date
Msg-id A737B7A37273E048B164557ADEF4A58B17CB29D7@ntex2010a.host.magwien.gv.at
Whole thread Raw
In response to Re: File system level backup of shut down standby does not work?  (Jürgen Fuchsberger <juergen.fuchsberger@uni-graz.at>)
Responses Re: File system level backup of shut down standby does not work?  (Jürgen Fuchsberger<juergen.fuchsberger@uni-graz.at>)
List pgsql-general
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

pgsql-general by date:

Previous
From: Herouth Maoz
Date:
Subject: Re: How do I track down a possible locking problem?
Next
From: "Antman, Jason (CMG-Atlanta)"
Date:
Subject: Re: File system level backup of shut down standby does not work?