Minor improvements to the description of archive_timeout.

This commit is contained in:
Neil Conway 2006-11-12 05:12:42 +00:00
parent a46ca619f8
commit 2b5fedc0d7
1 changed files with 16 additions and 18 deletions

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.94 2006/11/05 22:42:07 tgl Exp $ --> <!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.95 2006/11/12 05:12:42 neilc Exp $ -->
<chapter Id="runtime-config"> <chapter Id="runtime-config">
<title>Server Configuration</title> <title>Server Configuration</title>
@ -1601,24 +1601,22 @@ archive_command = 'copy "%p" /mnt/server/archivedir/"%f"' # Windows
</indexterm> </indexterm>
<listitem> <listitem>
<para> <para>
The <xref linkend="guc-archive-command"> is only invoked on completed The <xref linkend="guc-archive-command"> is only invoked on
WAL segments. Hence, completed WAL segments. Hence, if your server generates little WAL
if your server generates only little WAL traffic (or has slack periods traffic (or has slack periods where it does so), there could be a
where it does so), there could be a long delay between the completion long delay between the completion of a transaction and its safe
of a transaction and its safe recording in archive storage. To put recording in archive storage. To put a limit on how old unarchived
a limit on how old unarchived data can be, you can set data can be, you can set <varname>archive_timeout</> to force the
<varname>archive_timeout</> to force the server to switch server to switch to a new WAL segment file periodically. When this
to a new WAL segment file periodically. When this parameter is parameter is greater than zero, the server will switch to a new
greater than zero, the server will switch to a new segment file segment file whenever this many seconds have elapsed since the last
whenever this many seconds elapse since the last segment file switch. segment file switch. Note that archived files that are closed early
Note that archived due to a forced switch are still the same length as completely full
files that are closed early due to a forced switch are still the same files. Therefore, it is unwise to use a very short
length as completely full files. It is therefore unwise to set a very <varname>archive_timeout</> &mdash; it will bloat your archive
short <varname>archive_timeout</> &mdash; it will bloat your archive
storage. <varname>archive_timeout</> settings of a minute or so are storage. <varname>archive_timeout</> settings of a minute or so are
usually reasonable. usually reasonable. This parameter can only be set in the
This parameter can only be set in the <filename>postgresql.conf</> <filename>postgresql.conf</> file or on the server command line.
file or on the server command line.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>