Skip to content

Commit 63d0139

Browse files
committed
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.
1 parent ae96e62 commit 63d0139

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

src/backend/tcop/postgres.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.401 2004/04/25 18:23:56 neilc Exp $
11+
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.402 2004/05/07 01:53:41 momjian Exp $
1212
*
1313
* NOTES
1414
* this is the "main" module of the postgres backend and
@@ -2533,18 +2533,6 @@ PostgresMain(int argc, char *argv[], const char *username)
25332533
on_proc_exit(log_disconnections,0);
25342534
}
25352535

2536-
/*
2537-
* Post-processing for command line options.
2538-
*/
2539-
if (log_statement_stats &&
2540-
(log_parser_stats || log_planner_stats || log_executor_stats))
2541-
{
2542-
ereport(WARNING,
2543-
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2544-
errmsg("statement-level statistics are disabled because parser, planner, or executor statistics are on")));
2545-
SetConfigOption("log_statement_stats", "false", ctx, gucsource);
2546-
}
2547-
25482536
if (!IsUnderPostmaster || ExecBackend)
25492537
{
25502538
if (!potential_DataDir)

src/backend/utils/misc/guc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Written by Peter Eisentraut <peter_e@gmx.net>.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.203 2004/05/07 01:34:08 momjian Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.204 2004/05/07 01:53:41 momjian Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -4720,7 +4720,7 @@ assign_stage_log_stats(bool newval, bool doit, GucSource source)
47204720
{
47214721
if (doit)
47224722
ereport(ERROR,
4723-
(errcode(ERRCODE_ERROR_IN_ASSIGNMENT),
4723+
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
47244724
errmsg("Can not enable parameter when \"log_statement_stats\" is true.")));
47254725
else
47264726
return false;
@@ -4740,7 +4740,7 @@ assign_log_stats(bool newval, bool doit, GucSource source)
47404740
{
47414741
if (doit)
47424742
ereport(ERROR,
4743-
(errcode(ERRCODE_ERROR_IN_ASSIGNMENT),
4743+
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
47444744
errmsg("Can not enable \"log_statement_stats\" when \"log_parser_stats\",\n"
47454745
"\"log_planner_stats\", or \"log_executor_stats\" is true.")));
47464746
else

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy