Re: File system level backup of shut down standby does not work?

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: Jürgen Fuchsberger *EXTERN* <juergen(dot)fuchsberger(at)uni-graz(dot)at>, "Antman, Jason (CMG-Atlanta)" <Jason(dot)Antman(at)coxinc(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: File system level backup of shut down standby does not work?
Date: 2014-02-19 10:43:38
Message-ID: A737B7A37273E048B164557ADEF4A58B17CB29D7@ntex2010a.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message saravanan Chow 2014-02-19 12:21:03 configuration error
Previous Message Herouth Maoz 2014-02-19 10:40:08 Re: How do I track down a possible locking problem?