From c016ce728139be95bb0dc7c4e5640507334c2339 Mon Sep 17 00:00:00 2001 From: Simon Riggs Date: Tue, 8 Feb 2011 19:39:08 +0000 Subject: Named restore points in recovery. Users can record named points, then new recovery.conf parameter recovery_target_name allows PITR to specify named points as recovery targets. Jaime Casanova, reviewed by Euler Taveira de Oliveira, plus minor edits --- doc/src/sgml/backup.sgml | 7 ++++--- doc/src/sgml/func.sgml | 10 ++++++++++ doc/src/sgml/recovery-config.sgml | 25 +++++++++++++++++++++++-- 3 files changed, 37 insertions(+), 5 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml index 62830cb6ca0..0fbf1225aa5 100644 --- a/doc/src/sgml/backup.sgml +++ b/doc/src/sgml/backup.sgml @@ -1086,9 +1086,10 @@ restore_command = 'cp /mnt/server/archivedir/%f %p' the junior DBA dropped your main transaction table), just specify the required stopping point in recovery.conf. You can specify the stop point, known as the recovery target, either by - date/time or by completion of a specific transaction ID. As of this - writing only the date/time option is very usable, since there are no tools - to help you identify with any accuracy which transaction ID to use. + date/time, named restore point or by completion of a specific transaction + ID. As of this writing only the date/time and named restore point options + are very usable, since there are no tools to help you identify with any + accuracy which transaction ID to use. diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index e26e7614c94..897078ac3e6 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -13914,6 +13914,9 @@ SELECT set_config('log_statement_stats', 'off', false); backup + + pg_create_restore_point + pg_current_xlog_insert_location @@ -13951,6 +13954,13 @@ SELECT set_config('log_statement_stats', 'off', false); + + + pg_create_restore_point(name text) + + text + Create a named point for performing restore (restricted to superusers) + pg_current_xlog_insert_location() diff --git a/doc/src/sgml/recovery-config.sgml b/doc/src/sgml/recovery-config.sgml index 190e589032a..0706f791217 100644 --- a/doc/src/sgml/recovery-config.sgml +++ b/doc/src/sgml/recovery-config.sgml @@ -143,6 +143,25 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows Recovery Target Settings + + recovery_target_name + (string) + + + recovery_target_name recovery parameter + + + + This parameter specifies the named restore point, created with + pg_create_restore_point() to which recovery will proceed. + At most one of recovery_target_name, + or + can be specified. The default is to + recover to the end of the WAL log. + + + + recovery_target_time (timestamp) @@ -154,7 +173,8 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows This parameter specifies the time stamp up to which recovery will proceed. - At most one of recovery_target_time and + At most one of recovery_target_time, + or can be specified. The default is to recover to the end of the WAL log. The precise stopping point is also influenced by @@ -176,7 +196,8 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows start, transactions can complete in a different numeric order. The transactions that will be recovered are those that committed before (and optionally including) the specified one. - At most one of recovery_target_xid and + At most one of recovery_target_xid, + or can be specified. The default is to recover to the end of the WAL log. The precise stopping point is also influenced by -- cgit v1.2.3