|
7 | 7 | * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group |
8 | 8 | * Portions Copyright (c) 1994, Regents of the University of California |
9 | 9 | * |
10 | | - * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.421 2010/06/10 07:49:23 heikki Exp $ |
| 10 | + * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.422 2010/06/10 08:13:50 itagaki Exp $ |
11 | 11 | * |
12 | 12 | *------------------------------------------------------------------------- |
13 | 13 | */ |
@@ -180,7 +180,7 @@ static bool restoredFromArchive = false; |
180 | 180 | /* options taken from recovery.conf for archive recovery */ |
181 | 181 | static char *recoveryRestoreCommand = NULL; |
182 | 182 | static char *recoveryEndCommand = NULL; |
183 | | -static char *restartPointCommand = NULL; |
| 183 | +static char *archiveCleanupCommand = NULL; |
184 | 184 | static RecoveryTargetType recoveryTarget = RECOVERY_TARGET_UNSET; |
185 | 185 | static bool recoveryTargetInclusive = true; |
186 | 186 | static TransactionId recoveryTargetXid; |
@@ -382,10 +382,10 @@ typedef struct XLogCtlData |
382 | 382 | TimeLineID ThisTimeLineID; |
383 | 383 | TimeLineID RecoveryTargetTLI; |
384 | 384 | /* |
385 | | - * restartPointCommand is read from recovery.conf but needs to be in |
| 385 | + * archiveCleanupCommand is read from recovery.conf but needs to be in |
386 | 386 | * shared memory so that the bgwriter process can access it. |
387 | 387 | */ |
388 | | - char restartPointCommand[MAXPGPATH]; |
| 388 | + char archiveCleanupCommand[MAXPGPATH]; |
389 | 389 |
|
390 | 390 | /* |
391 | 391 | * SharedRecoveryInProgress indicates if we're still in crash or archive |
@@ -3063,7 +3063,7 @@ RestoreArchivedFile(char *path, const char *xlogfname, |
3063 | 3063 | * 'failonSignal' is true and the command is killed by a signal, a FATAL |
3064 | 3064 | * error is thrown. Otherwise a WARNING is emitted. |
3065 | 3065 | * |
3066 | | - * This is currently used for restore_end_command and restartpoint_command. |
| 3066 | + * This is currently used for restore_end_command and archive_cleanup_command. |
3067 | 3067 | */ |
3068 | 3068 | static void |
3069 | 3069 | ExecuteRecoveryCommand(char *command, char *commandName, bool failOnSignal) |
@@ -5140,12 +5140,12 @@ readRecoveryCommandFile(void) |
5140 | 5140 | (errmsg("recovery_end_command = '%s'", |
5141 | 5141 | recoveryEndCommand))); |
5142 | 5142 | } |
5143 | | - else if (strcmp(tok1, "restartpoint_command") == 0) |
| 5143 | + else if (strcmp(tok1, "archive_cleanup_command") == 0) |
5144 | 5144 | { |
5145 | | - restartPointCommand = pstrdup(tok2); |
| 5145 | + archiveCleanupCommand = pstrdup(tok2); |
5146 | 5146 | ereport(DEBUG2, |
5147 | | - (errmsg("restartpoint_command = '%s'", |
5148 | | - restartPointCommand))); |
| 5147 | + (errmsg("archive_cleanup_command = '%s'", |
| 5148 | + archiveCleanupCommand))); |
5149 | 5149 | } |
5150 | 5150 | else if (strcmp(tok1, "recovery_target_timeline") == 0) |
5151 | 5151 | { |
@@ -5752,13 +5752,13 @@ StartupXLOG(void) |
5752 | 5752 | ControlFile->checkPointCopy.ThisTimeLineID))); |
5753 | 5753 |
|
5754 | 5754 | /* |
5755 | | - * Save the selected recovery target timeline ID and restartpoint_command |
| 5755 | + * Save the selected recovery target timeline ID and archive_cleanup_command |
5756 | 5756 | * in shared memory so that other processes can see them |
5757 | 5757 | */ |
5758 | 5758 | XLogCtl->RecoveryTargetTLI = recoveryTargetTLI; |
5759 | | - strncpy(XLogCtl->restartPointCommand, |
5760 | | - restartPointCommand ? restartPointCommand : "", |
5761 | | - sizeof(XLogCtl->restartPointCommand)); |
| 5759 | + strncpy(XLogCtl->archiveCleanupCommand, |
| 5760 | + archiveCleanupCommand ? archiveCleanupCommand : "", |
| 5761 | + sizeof(XLogCtl->archiveCleanupCommand)); |
5762 | 5762 |
|
5763 | 5763 | if (InArchiveRecovery) |
5764 | 5764 | { |
@@ -7675,11 +7675,11 @@ CreateRestartPoint(int flags) |
7675 | 7675 | LWLockRelease(CheckpointLock); |
7676 | 7676 |
|
7677 | 7677 | /* |
7678 | | - * Finally, execute restartpoint_command, if any. |
| 7678 | + * Finally, execute archive_cleanup_command, if any. |
7679 | 7679 | */ |
7680 | | - if (XLogCtl->restartPointCommand[0]) |
7681 | | - ExecuteRecoveryCommand(XLogCtl->restartPointCommand, |
7682 | | - "restartpoint_command", |
| 7680 | + if (XLogCtl->archiveCleanupCommand[0]) |
| 7681 | + ExecuteRecoveryCommand(XLogCtl->archiveCleanupCommand, |
| 7682 | + "archive_cleanup_command", |
7683 | 7683 | false); |
7684 | 7684 |
|
7685 | 7685 | return true; |
|
0 commit comments