|
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.387 2010/04/0213:10:56 sriggs Exp $ |
| 10 | + * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.388 2010/04/0221:50:40 sriggs Exp $ |
11 | 11 | *
|
12 | 12 | *-------------------------------------------------------------------------
|
13 | 13 | */
|
@@ -5086,11 +5086,23 @@ readRecoveryCommandFile(void)
|
5086 | 5086 | cmdline),
|
5087 | 5087 | errhint("Lines should have the format parameter = 'value'.")));
|
5088 | 5088 |
|
5089 |
| -/* If not in standby mode, restore_command must be supplied */ |
5090 |
| -if (!StandbyMode&&recoveryRestoreCommand==NULL) |
5091 |
| -ereport(FATAL, |
5092 |
| -(errmsg("recovery command file \"%s\" did not specify restore_command nor standby_mode", |
5093 |
| -RECOVERY_COMMAND_FILE))); |
| 5089 | +/* |
| 5090 | + * Check for compulsory parameters |
| 5091 | + */ |
| 5092 | +if (StandbyMode) |
| 5093 | +{ |
| 5094 | +if (PrimaryConnInfo==NULL&&recoveryRestoreCommand==NULL) |
| 5095 | +ereport(FATAL, |
| 5096 | +(errmsg("recovery command file \"%s\" specified neither primary_conninfo nor restore_command", |
| 5097 | +RECOVERY_COMMAND_FILE))); |
| 5098 | +} |
| 5099 | +else |
| 5100 | +{ |
| 5101 | +if (recoveryRestoreCommand==NULL) |
| 5102 | +ereport(FATAL, |
| 5103 | +(errmsg("recovery command file \"%s\" did not specify restore_command nor standby_mode", |
| 5104 | +RECOVERY_COMMAND_FILE))); |
| 5105 | +} |
5094 | 5106 |
|
5095 | 5107 | /* Enable fetching from archive recovery area */
|
5096 | 5108 | InArchiveRecovery= true;
|
|