Add cross-reference from wal_level to hot_standby setting. Update

the PITR documentation to mention that you need to set wal_level to
'archive' or 'hot_standby', to enable WAL archiving. Per Simon's request.
This commit is contained in:
Heikki Linnakangas 2010-05-03 09:14:17 +00:00
parent 609a63fd85
commit f35951619c
2 changed files with 11 additions and 7 deletions

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.154 2010/04/29 21:49:03 tgl Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.155 2010/05/03 09:14:16 heikki Exp $ -->
<chapter id="backup">
<title>Backup and Restore</title>
@ -550,8 +550,9 @@ tar -cf backup.tar /usr/local/pgsql/data
</para>
<para>
To enable WAL archiving, set the <xref
linkend="guc-archive-mode"> configuration parameter to <literal>on</>,
To enable WAL archiving, set the <xref linkend="guc-wal-level">
configuration parameter to <literal>archive</> (or <literal>hot_standby</>),
<xref linkend="guc-archive-mode"> to <literal>on</>,
and specify the shell command to use in the <xref
linkend="guc-archive-command"> configuration parameter. In practice
these settings will always be placed in the
@ -694,7 +695,7 @@ archive_command = 'test ! -f /mnt/server/archivedir/%f &amp;&amp; cp %p /mnt/ser
linkend="populate-pitr">. If archiving or streaming replication were
turned on during execution of one of these statements, WAL would not
contain enough information for archive recovery. (Crash recovery is
unaffected.) For this reason, these parameters can only be changed at
unaffected.) For this reason, <varname>wal_level</> can only be changed at
server start. However, <varname>archive_command</> can be changed with a
configuration file reload. If you wish to temporarily stop archiving,
one way to do it is to set <varname>archive_command</> to the empty
@ -1180,7 +1181,8 @@ restore_command = 'cp /mnt/server/archivedir/%f %p'
</para>
<para>
To prepare for standalone hot backups, set <varname>archive_mode</> to
To prepare for standalone hot backups, set <varname>wal_level</> to
<literal>archive</> (or <literal>hot_standby</>), <varname>archive_mode</> to
<literal>on</>, and set up an <varname>archive_command</> that performs
archiving only when a <emphasis>switch file</> exists. For example:
<programlisting>

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.274 2010/05/02 11:32:53 sriggs Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.275 2010/05/03 09:14:17 heikki Exp $ -->
<chapter Id="runtime-config">
<title>Server Configuration</title>
@ -1384,7 +1384,9 @@ SET ENABLE_SEQSCAN TO OFF;
with <literal>archive</>, plus information needed to reconstruct
the status of running transactions from the WAL. To enable read-only
queries on a standby server, <varname>wal_level</> must be set to
<literal>hot_standby</> on the primary. It is thought that there is
<literal>hot_standby</> on the primary, and
<xref linkend="guc-hot-standby"> must be enabled in the standby. It is
thought that there is
little measurable difference in performance between using
<literal>hot_standby</> and <literal>archive</> levels, so feedback
is welcome if any production impacts are noticeable.