]> granicus.if.org Git - postgresql/commitdiff
Remove crude test for log_statement_stats in startup code now that we
authorBruce Momjian <bruce@momjian.us>
Fri, 7 May 2004 01:53:41 +0000 (01:53 +0000)
committerBruce Momjian <bruce@momjian.us>
Fri, 7 May 2004 01:53:41 +0000 (01:53 +0000)
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.

src/backend/tcop/postgres.c
src/backend/utils/misc/guc.c

index f2ca110493a2be0225ef64808a1138486ed9b818..89ec36287c759756eb085fd375ed94f6c3e33e5c 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * 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
  *       this is the "main" module of the postgres backend and
@@ -2533,18 +2533,6 @@ PostgresMain(int argc, char *argv[], const char *username)
                        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 (!potential_DataDir)
index 6fb2ab8859ed54a012957e0ae79689a2de9504ce..975f740ec238633c9d3e027ba9c5455e67fa4377 100644 (file)
@@ -10,7 +10,7 @@
  * Written by Peter Eisentraut <peter_e@gmx.net>.
  *
  * 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)
                {
                        if (doit)
                                ereport(ERROR,
-                                               (errcode(ERRCODE_ERROR_IN_ASSIGNMENT),
+                                               (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
                                        errmsg("Can not enable parameter when \"log_statement_stats\" is true.")));
                        else
                                return false;
@@ -4740,7 +4740,7 @@ assign_log_stats(bool newval, bool doit, GucSource source)
                {
                        if (doit)
                                ereport(ERROR,
-                                               (errcode(ERRCODE_ERROR_IN_ASSIGNMENT),
+                                               (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
                                        errmsg("Can not enable \"log_statement_stats\" when \"log_parser_stats\",\n"
                                                        "\"log_planner_stats\", or \"log_executor_stats\" is true.")));
                        else