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

ignored because it can only be set at server start.
This commit is contained in:
Bruce Momjian 2008-08-22 00:20:40 +00:00
parent bd3daddaf2
commit 03302fd9b4
2 changed files with 11 additions and 8 deletions

View File

@ -4,7 +4,7 @@
*
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/backend/utils/misc/guc-file.l,v 1.55 2008/05/09 15:36:31 petere Exp $
* $PostgreSQL: pgsql/src/backend/utils/misc/guc-file.l,v 1.56 2008/08/22 00:20:40 momjian Exp $
*/
%{
@ -258,8 +258,9 @@ ProcessConfigFile(GucContext context)
{
ereport(elevel,
(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
errmsg("parameter \"%s\" cannot be changed after server start; configuration file change ignored",
gconf->name)));
errmsg("attempted change of parameter \"%s\" ignored",
gconf->name),
errdetail("This parameter cannot be changed after server start.")));
continue;
}

View File

@ -10,7 +10,7 @@
* Written by Peter Eisentraut <peter_e@gmx.net>.
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.467 2008/08/19 18:30:04 tgl Exp $
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.468 2008/08/22 00:20:40 momjian Exp $
*
*--------------------------------------------------------------------
*/
@ -4598,16 +4598,18 @@ 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("parameter \"%s\" cannot be changed after server start; configuration file change ignored",
name)));
errmsg("attempted change of parameter \"%s\" ignored",
name),
errdetail("This parameter cannot be changed after server start.")));
return true;
}
if (context != PGC_POSTMASTER)
{
ereport(elevel,
(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
errmsg("parameter \"%s\" cannot be changed after server start",
name)));
errmsg("attempted change of parameter \"%s\" ignored",
name),
errdetail("This parameter cannot be changed after server start.")));
return false;
}
break;