Commit 87f4a26e authored by Peter Eisentraut's avatar Peter Eisentraut

Improve wording of error message when a postgresql.conf setting is

ignored because it can only be set at server start.  In particular,
hiding the main reason in the detail message was suboptimal.
parent 41a40fe4
......@@ -4,7 +4,7 @@
*
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/backend/utils/misc/guc-file.l,v 1.60 2009/09/17 20:54:03 petere Exp $
* $PostgreSQL: pgsql/src/backend/utils/misc/guc-file.l,v 1.61 2009/09/17 21:15:18 petere Exp $
*/
%{
......@@ -260,9 +260,8 @@ ProcessConfigFile(GucContext context)
{
ereport(elevel,
(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
errmsg("attempted change of parameter \"%s\" ignored",
gconf->name),
errdetail("This parameter cannot be changed after server start.")));
errmsg("parameter \"%s\" cannot be changed without restarting the server",
gconf->name)));
continue;
}
......
......@@ -10,7 +10,7 @@
* Written by Peter Eisentraut <peter_e@gmx.net>.
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.517 2009/09/11 19:17:03 tgl Exp $
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.518 2009/09/17 21:15:18 petere Exp $
*
*--------------------------------------------------------------------
*/
......@@ -4599,18 +4599,16 @@ set_config_option(const char *name, const char *value,
if (changeVal && !is_newvalue_equal(record, value))
ereport(elevel,
(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
errmsg("attempted change of parameter \"%s\" ignored",
name),
errdetail("This parameter cannot be changed after server start.")));
errmsg("parameter \"%s\" cannot be changed without restarting the server",
name)));
return true;
}
if (context != PGC_POSTMASTER)
{
ereport(elevel,
(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
errmsg("attempted change of parameter \"%s\" ignored",
name),
errdetail("This parameter cannot be changed after server start.")));
errmsg("parameter \"%s\" cannot be changed without restarting the server",
name)));
return false;
}
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment