Commit 63d01390 authored by Bruce Momjian's avatar Bruce Momjian

Remove crude test for log_statement_stats in startup code now that we

have a more proper GUC based test.

Also change error return code to ERRCODE_INVALID_PARAMETER_VALUE so it
matches the old error return code.
parent ae96e629
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.401 2004/04/25 18:23:56 neilc Exp $ * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.402 2004/05/07 01:53:41 momjian Exp $
* *
* NOTES * NOTES
* this is the "main" module of the postgres backend and * this is the "main" module of the postgres backend and
...@@ -2533,18 +2533,6 @@ PostgresMain(int argc, char *argv[], const char *username) ...@@ -2533,18 +2533,6 @@ PostgresMain(int argc, char *argv[], const char *username)
on_proc_exit(log_disconnections,0); on_proc_exit(log_disconnections,0);
} }
/*
* Post-processing for command line options.
*/
if (log_statement_stats &&
(log_parser_stats || log_planner_stats || log_executor_stats))
{
ereport(WARNING,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("statement-level statistics are disabled because parser, planner, or executor statistics are on")));
SetConfigOption("log_statement_stats", "false", ctx, gucsource);
}
if (!IsUnderPostmaster || ExecBackend) if (!IsUnderPostmaster || ExecBackend)
{ {
if (!potential_DataDir) if (!potential_DataDir)
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* Written by Peter Eisentraut <peter_e@gmx.net>. * Written by Peter Eisentraut <peter_e@gmx.net>.
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.203 2004/05/07 01:34:08 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.204 2004/05/07 01:53:41 momjian Exp $
* *
*-------------------------------------------------------------------- *--------------------------------------------------------------------
*/ */
...@@ -4720,7 +4720,7 @@ assign_stage_log_stats(bool newval, bool doit, GucSource source) ...@@ -4720,7 +4720,7 @@ assign_stage_log_stats(bool newval, bool doit, GucSource source)
{ {
if (doit) if (doit)
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_ERROR_IN_ASSIGNMENT), (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("Can not enable parameter when \"log_statement_stats\" is true."))); errmsg("Can not enable parameter when \"log_statement_stats\" is true.")));
else else
return false; return false;
...@@ -4740,7 +4740,7 @@ assign_log_stats(bool newval, bool doit, GucSource source) ...@@ -4740,7 +4740,7 @@ assign_log_stats(bool newval, bool doit, GucSource source)
{ {
if (doit) if (doit)
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_ERROR_IN_ASSIGNMENT), (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("Can not enable \"log_statement_stats\" when \"log_parser_stats\",\n" errmsg("Can not enable \"log_statement_stats\" when \"log_parser_stats\",\n"
"\"log_planner_stats\", or \"log_executor_stats\" is true."))); "\"log_planner_stats\", or \"log_executor_stats\" is true.")));
else else
......
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