On Wed, Feb 24, 2010 at 2:18 PM, Fujii Masao <masao.fu...@gmail.com> wrote: > If standby_mode is enabled, and neither primary_conninfo nor restore_command > are set, the standby would get stuck. How about forbidding (i.e., causing a > FATAL message) this wrong setting?
Here is the patch which forbids that wrong setting of recovery.conf. Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center
*** a/src/backend/access/transam/xlog.c --- b/src/backend/access/transam/xlog.c *************** *** 5043,5052 **** readRecoveryCommandFile(void) cmdline), errhint("Lines should have the format parameter = 'value'."))); ! /* If not in standby mode, restore_command must be supplied */ ! if (!StandbyMode && recoveryRestoreCommand == NULL) ereport(FATAL, ! (errmsg("recovery command file \"%s\" did not specify restore_command nor standby_mode", RECOVERY_COMMAND_FILE))); /* Enable fetching from archive recovery area */ --- 5043,5058 ---- cmdline), errhint("Lines should have the format parameter = 'value'."))); ! /* ! * Either restore_command or primary_conninfo must be supplied. Otherwise, ! * we cannot determine how to retrieve log files. Note that also ! * standby_mode should be checked since primary_conninfo has no effect ! * if standby_mode is off. ! */ ! if ((!StandbyMode || PrimaryConnInfo == NULL) && ! recoveryRestoreCommand == NULL) ereport(FATAL, ! (errmsg("recovery command file \"%s\" did not specify restore_command nor primary_conninfo", RECOVERY_COMMAND_FILE))); /* Enable fetching from archive recovery area */
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers