Re: Server does not start when log_statement_stats is set to on

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Devrim GÜNDÜZ <devrim(at)CommandPrompt(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Server does not start when log_statement_stats is set to on
Date: 2007-12-26 17:44:34
Message-ID: 9711.1198691074@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Devrim =?ISO-8859-1?Q?G=DCND=DCZ?= <devrim(at)CommandPrompt(dot)com> writes:
> I'm getting this error when I set lot_statement_stats to on :
> FATAL: invalid value for parameter "log_statement_stats": 1

> Per Alexey (and Alvaro), both log_planner_stats and log_statement_stats
> cannot be turned on at the same time.

Yup:

regression=# set log_planner_stats TO 1;
SET
regression=# set log_statement_stats TO 1;
ERROR: cannot enable "log_statement_stats" when "log_parser_stats", "log_planner_stats", or "log_executor_stats" is true

> Is that documented somewhere,

Yes.

> or can we please improve the error message here -- or is it a bug?

It's not a bug. However, the specific error message only comes out in
interactive-SET cases:

if (source >= PGC_S_INTERACTIVE)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("cannot enable \"log_statement_stats\" when "
"\"log_parser_stats\", \"log_planner_stats\", "
"or \"log_executor_stats\" is true")));

There are a bunch of other GUC assign hooks that behave similarly.
Perhaps it'd be sensible to emit these complaints as LOG messages
when we're dealing with a noninteractive source (ie, the config file)?

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2007-12-26 17:50:24 Re: Server does not start when log_statement_stats is set to on
Previous Message Devrim GÜNDÜZ 2007-12-26 17:29:01 Server does not start when log_statement_stats is set to on