|
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/1007:49:23 heikki Exp $ |
| 10 | + * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.422 2010/06/1008: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 | staticchar*recoveryRestoreCommand=NULL;
|
182 | 182 | staticchar*recoveryEndCommand=NULL;
|
183 |
| -staticchar*restartPointCommand=NULL; |
| 183 | +staticchar*archiveCleanupCommand=NULL; |
184 | 184 | staticRecoveryTargetTyperecoveryTarget=RECOVERY_TARGET_UNSET;
|
185 | 185 | staticboolrecoveryTargetInclusive= true;
|
186 | 186 | staticTransactionIdrecoveryTargetXid;
|
@@ -382,10 +382,10 @@ typedef struct XLogCtlData
|
382 | 382 | TimeLineIDThisTimeLineID;
|
383 | 383 | TimeLineIDRecoveryTargetTLI;
|
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 |
| -charrestartPointCommand[MAXPGPATH]; |
| 388 | +chararchiveCleanupCommand[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 andrestartpoint_command. |
| 3066 | + * This is currently used for restore_end_command andarchive_cleanup_command. |
3067 | 3067 | */
|
3068 | 3068 | staticvoid
|
3069 | 3069 | ExecuteRecoveryCommand(char*command,char*commandName,boolfailOnSignal)
|
@@ -5140,12 +5140,12 @@ readRecoveryCommandFile(void)
|
5140 | 5140 | (errmsg("recovery_end_command = '%s'",
|
5141 | 5141 | recoveryEndCommand)));
|
5142 | 5142 | }
|
5143 |
| -elseif (strcmp(tok1,"restartpoint_command")==0) |
| 5143 | +elseif (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 | elseif (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 andrestartpoint_command |
| 5755 | + * Save the selected recovery target timeline ID andarchive_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, executerestartpoint_command, if any. |
| 7678 | + * Finally, executearchive_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;
|
|