Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcf2575b

Browse files
Check compulsory parameters in recovery.conf in standby_mode, per docs.
1 parent3e754a8 commitcf2575b

File tree

1 file changed

+18
-6
lines changed
  • src/backend/access/transam

1 file changed

+18
-6
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
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 $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -5086,11 +5086,23 @@ readRecoveryCommandFile(void)
50865086
cmdline),
50875087
errhint("Lines should have the format parameter = 'value'.")));
50885088

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+
}
50945106

50955107
/* Enable fetching from archive recovery area */
50965108
InArchiveRecovery= true;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp