Confusing message in log file
Confusing message in log file
От:
"Gurjeet Singh" <singh.gurjeet@gmail.com>
Дата:
Hi All,
I changed the postgresql.conf file (of an 8.2.4 server), and issued relaod using pg_reload_config(). Following are the messages I see in the log files:
May 14 21:38:40 sfphotodb001 postgres[29658]: [19-1] 2008-05-14 21:38:40 PDTLOG: received SIGHUP, reloading configuration files
May 14 21:38:40 sfphotodb001 postgres[29658]: [20-1] 2008-05-14 21:38:40 PDTLOG: parameter "shared_buffers" cannot be changed after server start; configuration file change ignored
May 14 21:39:03 sfphotodb001 postgres[22928]: [21-1] 2008-05-14 21:39:03 PDTLOG: archived transaction log file "0000000100000E23000000C8"
What's confusing about this is that the second message says 'configuration file change ignored', so I expect the changed (newly enabled) archive_command to not take effect. But in fact, it does take effect.
The message probably should be rephrased to say that this setting (shared_buffers) will not be changed.
Best regards,
--
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com
EnterpriseDB http://www.enterprisedb.com
Mail sent from my BlackLaptop device
Re: Confusing message in log file
От:
Bruce Momjian <bruce@momjian.us>
Дата:
Gurjeet Singh wrote: > Hi All, > > I changed the postgresql.conf file (of an 8.2.4 server), and issued > relaod using pg_reload_config(). Following are the messages I see in the log > files: > > May 14 21:38:40 sfphotodb001 postgres[29658]: [19-1] 2008-05-14 21:38:40 > PDTLOG: received SIGHUP, reloading configuration files > May 14 21:38:40 sfphotodb001 postgres[29658]: [20-1] 2008-05-14 21:38:40 > PDTLOG: parameter "shared_buffers" cannot be changed after server start; > configuration file change ignored > May 14 21:39:03 sfphotodb001 postgres[22928]: [21-1] 2008-05-14 21:39:03 > PDTLOG: archived transaction log file "0000000100000E23000000C8" > > > What's confusing about this is that the second message says > 'configuration file change ignored', so I expect the changed (newly enabled) > archive_command to not take effect. But in fact, it does take effect. > > The message probably should be rephrased to say that this setting > (shared_buffers) will not be changed. Actually, no one else has been confused by this wording before, and I can't think of better wording that doesn't sound redundant. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
Re: Confusing message in log file
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Bruce Momjian writes: > Gurjeet Singh wrote: >> May 14 21:38:40 sfphotodb001 postgres[29658]: [20-1] 2008-05-14 21:38:40 >> PDTLOG: parameter "shared_buffers" cannot be changed after server start; >> configuration file change ignored >> >> The message probably should be rephrased to say that this setting >> (shared_buffers) will not be changed. > Actually, no one else has been confused by this wording before, and I > can't think of better wording that doesn't sound redundant. How about "... after server start; change ignored" ? Or "attempted change ignored" ? regards, tom lane
Re: Confusing message in log file
От:
Bruce Momjian <bruce@momjian.us>
Дата:
Tom Lane wrote: > Bruce Momjian writes: > > Gurjeet Singh wrote: > >> May 14 21:38:40 sfphotodb001 postgres[29658]: [20-1] 2008-05-14 21:38:40 > >> PDTLOG: parameter "shared_buffers" cannot be changed after server start; > >> configuration file change ignored > >> > >> The message probably should be rephrased to say that this setting > >> (shared_buffers) will not be changed. > > > Actually, no one else has been confused by this wording before, and I > > can't think of better wording that doesn't sound redundant. > > How about "... after server start; change ignored" ? > Or "attempted change ignored" ? Yea, I like "change ignored" rather than mentioning the configuration file. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
Re: Confusing message in log file
От:
Alvaro Herrera <alvherre@commandprompt.com>
Дата:
Bruce Momjian escribió:
> Gurjeet Singh wrote:
> > May 14 21:38:40 sfphotodb001 postgres[29658]: [19-1] 2008-05-14 21:38:40
> > PDTLOG: received SIGHUP, reloading configuration files
> > May 14 21:38:40 sfphotodb001 postgres[29658]: [20-1] 2008-05-14 21:38:40
> > PDTLOG: parameter "shared_buffers" cannot be changed after server start;
> > configuration file change ignored
> > What's confusing about this is that the second message says
> > 'configuration file change ignored', so I expect the changed (newly enabled)
> > archive_command to not take effect. But in fact, it does take effect.
> >
> > The message probably should be rephrased to say that this setting
> > (shared_buffers) will not be changed.
>
> Actually, no one else has been confused by this wording before, and I
> can't think of better wording that doesn't sound redundant.
Perhaps this is because not enough people have seen it. I agree that
the message should specify that only this setting has been ignored.
In any case, this seems a case of stuffing too much in the primary
message. I think it should be something like
errmsg("parameter \"shared_buffer\" change in configuration file ignored"),
errdetail("This parameter cannot be changed after server start.")
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
Re: Confusing message in log file
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Alvaro Herrera writes:
> In any case, this seems a case of stuffing too much in the primary
> message.
Yeah, good point.
> I think it should be something like
> errmsg("parameter \"shared_buffer\" change in configuration file ignored"),
> errdetail("This parameter cannot be changed after server start.")
Seems a bit awkwardly phrased. I propose
errmsg("attempted change to parameter \"shared_buffer\" ignored"),
errdetail("This parameter cannot be changed after server start.")
(or possibly "of" would read better than "to")
regards, tom lane
Re: Confusing message in log file
От:
"Gurjeet Singh" <singh.gurjeet@gmail.com>
Дата:
On Mon, Jun 30, 2008 at 7:33 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
'of' sounds better than 'to'.
Best regards,
--
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com
EnterpriseDB http://www.enterprisedb.com
Mail sent from my BlackLaptop device
Alvaro Herrera <alvherre@commandprompt.com> writes:Yeah, good point.
> In any case, this seems a case of stuffing too much in the primary
> message.Seems a bit awkwardly phrased. I propose
> I think it should be something like
> errmsg("parameter \"shared_buffer\" change in configuration file ignored"),
> errdetail("This parameter cannot be changed after server start.")
errmsg("attempted change to parameter \"shared_buffer\" ignored"),errdetail("This parameter cannot be changed after server start.")(or possibly "of" would read better than "to")
'of' sounds better than 'to'.
Best regards,
--
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com
EnterpriseDB http://www.enterprisedb.com
Mail sent from my BlackLaptop device
Re: Confusing message in log file
От:
Bruce Momjian <bruce@momjian.us>
Дата:
Wording adjusted and applied with attached patch.
---------------------------------------------------------------------------
Gurjeet Singh wrote:
> On Mon, Jun 30, 2008 at 7:33 PM, Tom Lane wrote:
>
> > Alvaro Herrera writes:
> > > In any case, this seems a case of stuffing too much in the primary
> > > message.
> >
> > Yeah, good point.
> >
> > > I think it should be something like
> > > errmsg("parameter \"shared_buffer\" change in configuration file
> > ignored"),
> > > errdetail("This parameter cannot be changed after server start.")
> >
> > Seems a bit awkwardly phrased. I propose
> >
> > errmsg("attempted change to parameter \"shared_buffer\" ignored"),
> > errdetail("This parameter cannot be changed after server start.")
> >
> > (or possibly "of" would read better than "to")
> >
> >
> 'of' sounds better than 'to'.
>
> Best regards,
> --
> gurjeet[.singh]@EnterpriseDB.com
> singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com
>
> EnterpriseDB http://www.enterprisedb.com
>
> Mail sent from my BlackLaptop device
--
Bruce Momjian http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Index: src/backend/utils/misc/guc-file.l
===================================================================
RCS file: /cvsroot/pgsql/src/backend/utils/misc/guc-file.l,v
retrieving revision 1.55
diff -c -c -r1.55 guc-file.l
*** src/backend/utils/misc/guc-file.l 9 May 2008 15:36:31 -0000 1.55
--- src/backend/utils/misc/guc-file.l 22 Aug 2008 00:01:00 -0000
***************
*** 258,265 ****
{
ereport(elevel,
(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
! errmsg("parameter \"%s\" cannot be changed after server start; configuration file change ignored",
! gconf->name)));
continue;
}
--- 258,266 ----
{
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.")));
continue;
}
Index: src/backend/utils/misc/guc.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v
retrieving revision 1.466
diff -c -c -r1.466 guc.c
*** src/backend/utils/misc/guc.c 15 Aug 2008 08:37:40 -0000 1.466
--- src/backend/utils/misc/guc.c 22 Aug 2008 00:01:06 -0000
***************
*** 4598,4613 ****
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)));
return true;
}
if (context != PGC_POSTMASTER)
{
ereport(elevel,
(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
! errmsg("parameter \"%s\" cannot be changed after server start",
! name)));
return false;
}
break;
--- 4598,4615 ----
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.")));
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.")));
return false;
}
break;