aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2012-01-25 18:02:04 +0000
committerSimon Riggs <simon@2ndQuadrant.com>2012-01-25 18:02:04 +0000
commit8366c7803ec3d0591cf2d1226fea1fee947d56c3 (patch)
tree6cdd97e2f9352127db470507f4e650fde0ad6f86 /doc/src
parent74ab96a45ef6259aa6a86a781580edea8488511a (diff)
downloadpostgresql-8366c7803ec3d0591cf2d1226fea1fee947d56c3.tar.gz
postgresql-8366c7803ec3d0591cf2d1226fea1fee947d56c3.zip
Allow pg_basebackup from standby node with safety checking.
Base backup follows recommended procedure, plus goes to great lengths to ensure that partial page writes are avoided. Jun Ishizuka and Fujii Masao, with minor modifications
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/pg_basebackup.sgml42
1 files changed, 42 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/pg_basebackup.sgml b/doc/src/sgml/ref/pg_basebackup.sgml
index 05d5bedef93..c654a364124 100644
--- a/doc/src/sgml/ref/pg_basebackup.sgml
+++ b/doc/src/sgml/ref/pg_basebackup.sgml
@@ -64,6 +64,48 @@ PostgreSQL documentation
better from a performance point of view to take only one backup, and copy
the result.
</para>
+
+ <para>
+ <application>pg_basebackup</application> can make a base backup from
+ not only the master but also the standby. To take a backup from the standby,
+ set up the standby so that it can accept replication connections (that is, set
+ <varname>max_wal_senders</> and <xref linkend="guc-hot-standby">,
+ and configure <link linkend="auth-pg-hba-conf">host-based authentication</link>).
+ You will also need to enable <xref linkend="guc-full-page-writes"> on the master.
+ </para>
+
+ <para>
+ Note that there are some limitations in an online backup from the standby:
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ The backup history file is not created in the database cluster backed up.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ There is no guarantee that all WAL files required for the backup are archived
+ at the end of backup. If you are planning to use the backup for an archive
+ recovery and want to ensure that all required files are available at that moment,
+ you need to include them into the backup by using <literal>-x</> option.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ If the standby is promoted to the master during online backup, the backup fails.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ All WAL records required for the backup must contain sufficient full-page writes,
+ which requires you to enable <varname>full_page_writes</> on the master and
+ not to use the tool like <application>pg_compresslog</> as
+ <varname>archive_command</> to remove full-page writes from WAL files.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
</refsect1>
<refsect1>