aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2011-02-08 19:39:08 +0000
committerSimon Riggs <simon@2ndQuadrant.com>2011-02-08 19:39:08 +0000
commitc016ce728139be95bb0dc7c4e5640507334c2339 (patch)
tree43b1708d3a4f637ddd5dcaa0474e8f9bedc9508e /doc/src
parent8c6e3adbf792c2bba448e88cbf2c8e03fb802e73 (diff)
downloadpostgresql-c016ce728139be95bb0dc7c4e5640507334c2339.tar.gz
postgresql-c016ce728139be95bb0dc7c4e5640507334c2339.zip
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
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/backup.sgml7
-rw-r--r--doc/src/sgml/func.sgml10
-rw-r--r--doc/src/sgml/recovery-config.sgml25
3 files changed, 37 insertions, 5 deletions
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 <filename>recovery.conf</>. You can specify
the stop point, known as the <quote>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.
</para>
<note>
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
@@ -13915,6 +13915,9 @@ SELECT set_config('log_statement_stats', 'off', false);
<primary>backup</primary>
</indexterm>
<indexterm>
+ <primary>pg_create_restore_point</primary>
+ </indexterm>
+ <indexterm>
<primary>pg_current_xlog_insert_location</primary>
</indexterm>
<indexterm>
@@ -13953,6 +13956,13 @@ SELECT set_config('log_statement_stats', 'off', false);
<tbody>
<row>
<entry>
+ <literal><function>pg_create_restore_point(<parameter>name</> <type>text</>)</function></literal>
+ </entry>
+ <entry><type>text</type></entry>
+ <entry>Create a named point for performing restore (restricted to superusers)</entry>
+ </row>
+ <row>
+ <entry>
<literal><function>pg_current_xlog_insert_location()</function></literal>
</entry>
<entry><type>text</type></entry>
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
<title>Recovery Target Settings</title>
<variablelist>
+ <varlistentry id="recovery-target-name" xreflabel="recovery_target_name">
+ <term><varname>recovery_target_name</varname>
+ (<type>string</type>)
+ </term>
+ <indexterm>
+ <primary><varname>recovery_target_name</> recovery parameter</primary>
+ </indexterm>
+ <listitem>
+ <para>
+ This parameter specifies the named restore point, created with
+ <function>pg_create_restore_point()</> to which recovery will proceed.
+ At most one of <varname>recovery_target_name</>,
+ <xref linkend="recovery-target-time"> or
+ <xref linkend="recovery-target-xid"> can be specified. The default is to
+ recover to the end of the WAL log.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="recovery-target-time" xreflabel="recovery_target_time">
<term><varname>recovery_target_time</varname>
(<type>timestamp</type>)
@@ -154,7 +173,8 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
<para>
This parameter specifies the time stamp up to which recovery
will proceed.
- At most one of <varname>recovery_target_time</> and
+ At most one of <varname>recovery_target_time</>,
+ <xref linkend="recovery-target-name"> or
<xref linkend="recovery-target-xid"> 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 <varname>recovery_target_xid</> and
+ At most one of <varname>recovery_target_xid</>,
+ <xref linkend="recovery-target-name"> or
<xref linkend="recovery-target-time"> can be specified.
The default is to recover to the end of the WAL log.
The precise stopping point is also influenced by