diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2010-03-18 09:17:18 +0000 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2010-03-18 09:17:18 +0000 |
commit | c21ac0b58e8c3bb050d87e213a6f4524b01b2a6d (patch) | |
tree | 690f96b293965ecbc089816d13ae482382694f9b /doc/src | |
parent | 6407fa996a0f2a9da1fbb91fd47afe97f5743be8 (diff) | |
download | postgresql-c21ac0b58e8c3bb050d87e213a6f4524b01b2a6d.tar.gz postgresql-c21ac0b58e8c3bb050d87e213a6f4524b01b2a6d.zip |
Add restartpoint_command option to recovery.conf. Fix bug in %r handling
in recovery_end_command, it always came out as 0 because InRedo was
cleared before recovery_end_command was executed. Also, always take
ControlFileLock when reading checkpoint location for %r.
The recovery_end_command bug and the missing locking was present in 8.4
as well, that part of this patch will be backported separately.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/recovery-config.sgml | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/doc/src/sgml/recovery-config.sgml b/doc/src/sgml/recovery-config.sgml index 4bfa573b47e..3a6a31cb53d 100644 --- a/doc/src/sgml/recovery-config.sgml +++ b/doc/src/sgml/recovery-config.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/recovery-config.sgml,v 2.2 2010/02/25 09:32:19 heikki Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/recovery-config.sgml,v 2.3 2010/03/18 09:17:18 heikki Exp $ --> <chapter Id="recovery-config"> <title>Recovery Configuration</title> @@ -59,14 +59,15 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows </listitem> </varlistentry> - <varlistentry id="recovery-end-command" xreflabel="recovery_end_command"> - <term><varname>recovery_end_command</varname> (<type>string</type>)</term> + <varlistentry id="restartpoint-command" xreflabel="restartpoint_command"> + <term><varname>restartpoint_command</varname> (<type>string</type>)</term> <listitem> <para> - This parameter specifies a shell command that will be executed once only - at the end of recovery. This parameter is optional. The purpose of the - <varname>recovery_end_command</> is to provide a mechanism for cleanup - following replication or recovery. + This parameter specifies a shell command that will be executed at + every restartpoint. This parameter is optional. The purpose of the + <varname>restartpoint_command</> is to provide a mechanism for cleaning + up old archived WAL files that are no longer needed by the standby + server. Any <literal>%r</> is replaced by the name of the file containing the last valid restart point. That is the earliest file that must be kept to allow a restore to be restartable, so this information @@ -79,6 +80,24 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows </para> <para> If the command returns a non-zero exit status then a WARNING log + message will be written. + </para> + </listitem> + </varlistentry> + + <varlistentry id="recovery-end-command" xreflabel="recovery_end_command"> + <term><varname>recovery_end_command</varname> (<type>string</type>)</term> + <listitem> + <para> + This parameter specifies a shell command that will be executed once only + at the end of recovery. This parameter is optional. The purpose of the + <varname>recovery_end_command</> is to provide a mechanism for cleanup + following replication or recovery. + Any <literal>%r</> is replaced by the name of the file containing the + last valid restart point, like in <xref linkend="restartpoint-command">. + </para> + <para> + If the command returns a non-zero exit status then a WARNING log message will be written and the database will proceed to start up anyway. An exception is that if the command was terminated by a signal, the database will not proceed with startup. |