Index: doc/src/sgml/pgstandby.sgml
===================================================================
--- doc/src/sgml/pgstandby.sgml (HEAD)
+++ doc/src/sgml/pgstandby.sgml (archive_cleanup_command)
@@ -242,7 +242,7 @@
restore_command = 'pg_standby -d -s 2 -t /tmp/pgsql.trigger.5442 .../archive %f %p %r 2>>standby.log'
-recovery_end_command = 'rm -f /tmp/pgsql.trigger.5442'
+archive_cleanup_command = 'rm -f /tmp/pgsql.trigger.5442'
where the archive directory is physically located on the standby server,
@@ -287,12 +287,12 @@
restore_command = 'pg_standby -d -s 5 -t C:\pgsql.trigger.5442 ...\archive %f %p %r 2>>standby.log'
-recovery_end_command = 'del C:\pgsql.trigger.5442'
+archive_cleanup_command = 'del C:\pgsql.trigger.5442'
Note that backslashes need to be doubled in the
archive_command>, but not in the
- restore_command> or recovery_end_command>.
+ restore_command> or archive_cleanup_command>.
This will:
@@ -363,7 +363,7 @@
PostgreSQL> 8.4 provides the
- recovery_end_command option. Without this option
+ archive_cleanup_command option. Without this option
a leftover trigger file can be hazardous.
Index: doc/src/sgml/recovery-config.sgml
===================================================================
--- doc/src/sgml/recovery-config.sgml (HEAD)
+++ doc/src/sgml/recovery-config.sgml (archive_cleanup_command)
@@ -102,16 +102,16 @@
-
- recovery_end_command (string)
+
+ archive_cleanup_command (string)
- recovery_end_command> recovery parameter
+ archive_cleanup_command> recovery parameter
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
- recovery_end_command> is to provide a mechanism for cleanup
+ archive_cleanup_command> is to provide a mechanism for cleanup
following replication or recovery.
Any %r> is replaced by the name of the file containing the
last valid restart point, like in .
Index: doc/src/sgml/release-8.4.sgml
===================================================================
--- doc/src/sgml/release-8.4.sgml (HEAD)
+++ doc/src/sgml/release-8.4.sgml (archive_cleanup_command)
@@ -157,7 +157,7 @@
Fix erroneous handling of %r> parameter in
- recovery_end_command> (Heikki)
+ archive_cleanup_command> (Heikki)
@@ -4974,7 +4974,7 @@
To make this work safely, you now need to set the new
- recovery_end_command> option in recovery.conf>
+ archive_cleanup_command> option in recovery.conf>
to clean up the trigger file after failover. pg_standby>
will no longer remove the trigger file itself.
Index: src/backend/access/transam/recovery.conf.sample
===================================================================
--- src/backend/access/transam/recovery.conf.sample (HEAD)
+++ src/backend/access/transam/recovery.conf.sample (archive_cleanup_command)
@@ -53,12 +53,12 @@
#
#restartpoint_command = ''
#
-# recovery_end_command
+# archive_cleanup_command
#
# specifies an optional shell command to execute at completion of recovery.
# This can be useful for cleaning up after the restore_command.
#
-#recovery_end_command = ''
+#archive_cleanup_command = ''
#
#---------------------------------------------------------------------------
# RECOVERY TARGET PARAMETERS
Index: src/backend/access/transam/xlog.c
===================================================================
--- src/backend/access/transam/xlog.c (HEAD)
+++ src/backend/access/transam/xlog.c (archive_cleanup_command)
@@ -179,7 +179,7 @@
/* options taken from recovery.conf for archive recovery */
static char *recoveryRestoreCommand = NULL;
-static char *recoveryEndCommand = NULL;
+static char *archiveCleanupCommand = NULL;
static char *restartPointCommand = NULL;
static RecoveryTargetType recoveryTarget = RECOVERY_TARGET_UNSET;
static bool recoveryTargetInclusive = true;
@@ -3135,7 +3135,7 @@
/*
* translator: First %s represents a recovery.conf parameter name like
- * "recovery_end_command", and the 2nd is the value of that parameter.
+ * "archive_cleanup_command", and the 2nd is the value of that parameter.
*/
ereport((signaled && failOnSignal) ? FATAL : WARNING,
(errmsg("%s \"%s\": return code %d", commandName,
@@ -5117,12 +5117,12 @@
(errmsg("restore_command = '%s'",
recoveryRestoreCommand)));
}
- else if (strcmp(tok1, "recovery_end_command") == 0)
+ else if (strcmp(tok1, "archive_cleanup_command") == 0)
{
- recoveryEndCommand = pstrdup(tok2);
+ archiveCleanupCommand = pstrdup(tok2);
ereport(DEBUG2,
- (errmsg("recovery_end_command = '%s'",
- recoveryEndCommand)));
+ (errmsg("archive_cleanup_command = '%s'",
+ archiveCleanupCommand)));
}
else if (strcmp(tok1, "restartpoint_command") == 0)
{
@@ -6385,11 +6385,11 @@
CreateCheckPoint(CHECKPOINT_END_OF_RECOVERY | CHECKPOINT_IMMEDIATE);
/*
- * And finally, execute the recovery_end_command, if any.
+ * And finally, execute the archive_cleanup_command, if any.
*/
- if (recoveryEndCommand)
- ExecuteRecoveryCommand(recoveryEndCommand,
- "recovery_end_command",
+ if (archiveCleanupCommand)
+ ExecuteRecoveryCommand(archiveCleanupCommand,
+ "archive_cleanup_command",
true);
}