From aedccb1f6fef988af1d1a25b78151f3773954b4c Mon Sep 17 00:00:00 2001 From: Simon Riggs Date: Tue, 25 Nov 2014 20:13:30 +0000 Subject: action_at_recovery_target recovery config option action_at_recovery_target = pause | promote | shutdown Petr Jelinek Reviewed by Muhammad Asif Naeem, Fujji Masao and Simon Riggs --- doc/src/sgml/recovery-config.sgml | 58 +++++++++++++++++++++++++++++++++------ 1 file changed, 50 insertions(+), 8 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/recovery-config.sgml b/doc/src/sgml/recovery-config.sgml index 0f1ff343a6c..a145a3fee2b 100644 --- a/doc/src/sgml/recovery-config.sgml +++ b/doc/src/sgml/recovery-config.sgml @@ -289,12 +289,39 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows - Specifies whether recovery should pause when the recovery target - is reached. The default is true. - This is intended to allow queries to be executed against the - database to check if this recovery target is the most desirable - point for recovery. The paused state can be resumed by using - pg_xlog_replay_resume() (See + Alias for action_at_recovery_target, true is same as + action_at_recovery_target = pause and false + is same as action_at_recovery_target = promote. + + + This setting has no effect if is not + enabled, or if no recovery target is set. + + + + + + + + action_at_recovery_target (enum) + + action_at_recovery_target recovery parameter + + + + + Specifies what action the server should take once the recovery target is + reached. The default is pause, which means recovery will + be paused. promote means recovery process will finish and + the server will start to accept connections. + Finally shutdown will stop the server after reaching the + recovery target. + + The intended use of pause setting is to allow queries to be + executed against the database to check if this recovery target is the + most desirable point for recovery. The paused state can be resumed by + using pg_xlog_replay_resume() (See ), which then causes recovery to end. If this recovery target is not the desired stopping point, then shutdown the server, change the @@ -302,8 +329,23 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows continue recovery. - This setting has no effect if is not - enabled, or if no recovery target is set. + The shutdown setting is useful to have instance ready at + exact replay point desired. + The instance will still be able to replay more WAL records (and in fact + will have to replay WAL records since last checkpoint next time it is + started). + + + Note that because recovery.conf will not be renamed when + action_at_recovery_target is set to shutdown, + any subsequent start will end with immediate shutdown unless the + configuration is changed or the recovery.conf is removed + manually. + + + This setting has no effect if no recovery target is set. + If is not enabled, a setting of + pause will act the same as shutdown. -- cgit v1.2.3