Re: Server does not start when log_statement_stats is set to on - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Server does not start when log_statement_stats is set to on
Date
Msg-id 9711.1198691074@sss.pgh.pa.us
Whole thread Raw
In response to Server does not start when log_statement_stats is set to on  (Devrim GÜNDÜZ <devrim@CommandPrompt.com>)
Responses Re: Server does not start when log_statement_stats is set to on  (Alvaro Herrera <alvherre@CommandPrompt.com>)
List pgsql-bugs
Devrim GÜNDÜZ <devrim@CommandPrompt.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\"
istrue"))); 

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


pgsql-bugs by date:

Previous
From: Devrim GÜNDÜZ
Date:
Subject: Server does not start when log_statement_stats is set to on
Next
From: Alvaro Herrera
Date:
Subject: Re: Server does not start when log_statement_stats is set to on