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