Skip to content

Commit d36aa2e

Browse files
committed
Rename:
! #show_parser_stats = false ! #show_planner_stats = false ! #show_executor_stats = false ! #show_statement_stats = false TO: ! #log_parser_stats = false ! #log_planner_stats = false ! #log_executor_stats = false ! #log_statement_stats = false
1 parent 001d5a7 commit d36aa2e

File tree

7 files changed

+63
-61
lines changed

7 files changed

+63
-61
lines changed

doc/src/sgml/runtime.sgml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.151 2002/11/14 23:53:26 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.152 2002/11/15 00:47:22 momjian Exp $
33
-->
44

55
<Chapter Id="runtime">
@@ -1110,10 +1110,10 @@ env PGOPTIONS='-c geqo=off' psql
11101110
</varlistentry>
11111111

11121112
<varlistentry>
1113-
<term><varname>SHOW_STATEMENT_STATS</varname> (<type>boolean</type>)</term>
1114-
<term><varname>SHOW_PARSER_STATS</varname> (<type>boolean</type>)</term>
1115-
<term><varname>SHOW_PLANNER_STATS</varname> (<type>boolean</type>)</term>
1116-
<term><varname>SHOW_EXECUTOR_STATS</varname> (<type>boolean</type>)</term>
1113+
<term><varname>LOG_STATEMENT_STATS</varname> (<type>boolean</type>)</term>
1114+
<term><varname>LOG_PARSER_STATS</varname> (<type>boolean</type>)</term>
1115+
<term><varname>LOG_PLANNER_STATS</varname> (<type>boolean</type>)</term>
1116+
<term><varname>LOG_EXECUTOR_STATS</varname> (<type>boolean</type>)</term>
11171117
<listitem>
11181118
<para>
11191119
For each query, write performance statistics of the respective
@@ -2250,7 +2250,9 @@ $ <userinput>postmaster -o '-S 1024 -s'</userinput>
22502250

22512251
<row>
22522252
<entry><option>-tpa</option>, <option>-tpl</option>, <option>-te</option><footnoteref linkend="fn.runtime-config-short"></entry>
2253-
<entry><literal>show_parser_stats=on</>, <literal>show_planner_stats=on</>, <literal>show_executor_stats=on</></entry>
2253+
<entry><literal>log_parser_stats=on</>,
2254+
<literal>log_planner_stats=on</>,
2255+
<literal>log_executor_stats=on</></entry>
22542256
</row>
22552257
</tbody>
22562258
</tgroup>

src/backend/commands/prepare.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Copyright (c) 2002, PostgreSQL Global Development Group
77
*
88
* IDENTIFICATION
9-
* $Header: /cvsroot/pgsql/src/backend/commands/prepare.c,v 1.7 2002/11/13 00:39:46 momjian Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/commands/prepare.c,v 1.8 2002/11/15 00:47:22 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -153,7 +153,7 @@ ExecuteQuery(ExecuteStmt *stmt, CommandDest outputDest)
153153
QueryDesc *qdesc;
154154
EState *state;
155155

156-
if (Show_executor_stats)
156+
if (log_executor_stats)
157157
ResetUsage();
158158

159159
qdesc = CreateQueryDesc(query, plan, outputDest, NULL);
@@ -172,7 +172,7 @@ ExecuteQuery(ExecuteStmt *stmt, CommandDest outputDest)
172172

173173
RunQuery(qdesc, state);
174174

175-
if (Show_executor_stats)
175+
if (log_executor_stats)
176176
ShowUsage("EXECUTOR STATISTICS");
177177
}
178178

src/backend/tcop/postgres.c

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.308 2002/11/14 23:53:27 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.309 2002/11/15 00:47:22 momjian Exp $
1212
*
1313
* NOTES
1414
* this is the "main" module of the postgres backend and
@@ -368,15 +368,15 @@ pg_parse_query(StringInfo query_string, Oid *typev, int nargs)
368368
{
369369
List *raw_parsetree_list;
370370

371-
if (Log_statement)
371+
if (log_statement)
372372
elog(LOG, "query: %s", query_string->data);
373373

374-
if (Show_parser_stats)
374+
if (log_parser_stats)
375375
ResetUsage();
376376

377377
raw_parsetree_list = parser(query_string, typev, nargs);
378378

379-
if (Show_parser_stats)
379+
if (log_parser_stats)
380380
ShowUsage("PARSER STATISTICS");
381381

382382
return raw_parsetree_list;
@@ -402,12 +402,12 @@ pg_analyze_and_rewrite(Node *parsetree)
402402
/*
403403
* (1) Perform parse analysis.
404404
*/
405-
if (Show_parser_stats)
405+
if (log_parser_stats)
406406
ResetUsage();
407407

408408
querytree_list = parse_analyze(parsetree, NULL);
409409

410-
if (Show_parser_stats)
410+
if (log_parser_stats)
411411
{
412412
ShowUsage("PARSE ANALYSIS STATISTICS");
413413
ResetUsage();
@@ -444,7 +444,7 @@ pg_analyze_and_rewrite(Node *parsetree)
444444

445445
querytree_list = new_list;
446446

447-
if (Show_parser_stats)
447+
if (log_parser_stats)
448448
ShowUsage("REWRITER STATISTICS");
449449

450450
#ifdef COPY_PARSE_PLAN_TREES
@@ -479,13 +479,13 @@ pg_plan_query(Query *querytree)
479479
if (querytree->commandType == CMD_UTILITY)
480480
return NULL;
481481

482-
if (Show_planner_stats)
482+
if (log_planner_stats)
483483
ResetUsage();
484484

485485
/* call the optimizer */
486486
plan = planner(querytree);
487487

488-
if (Show_planner_stats)
488+
if (log_planner_stats)
489489
ShowUsage("PLANNER STATISTICS");
490490

491491
#ifdef COPY_PARSE_PLAN_TREES
@@ -559,15 +559,15 @@ pg_exec_query_string(StringInfo query_string, /* string to execute */
559559
*parsetree_item;
560560
struct timeval start_t,
561561
stop_t;
562-
bool save_Log_duration = Log_duration;
562+
bool save_log_duration = log_duration;
563563

564564
debug_query_string = query_string->data;
565565

566566
/*
567-
* We use save_Log_duration so "SET Log_duration = true" doesn't
567+
* We use save_log_duration so "SET log_duration = true" doesn't
568568
* report incorrect time because gettimeofday() wasn't called.
569569
*/
570-
if (save_Log_duration)
570+
if (save_log_duration)
571571
gettimeofday(&start_t, NULL);
572572

573573
/*
@@ -820,7 +820,7 @@ pg_exec_query_string(StringInfo query_string, /* string to execute */
820820
/*
821821
* execute the plan
822822
*/
823-
if (Show_executor_stats)
823+
if (log_executor_stats)
824824
ResetUsage();
825825

826826
if (dontExecute)
@@ -845,7 +845,7 @@ pg_exec_query_string(StringInfo query_string, /* string to execute */
845845
}
846846
}
847847

848-
if (Show_executor_stats)
848+
if (log_executor_stats)
849849
ShowUsage("EXECUTOR STATISTICS");
850850
}
851851

@@ -933,7 +933,7 @@ pg_exec_query_string(StringInfo query_string, /* string to execute */
933933
if (xact_started)
934934
finish_xact_command(false);
935935

936-
if (save_Log_duration)
936+
if (save_log_duration)
937937
{
938938
gettimeofday(&stop_t, NULL);
939939
if (stop_t.tv_usec < start_t.tv_usec)
@@ -1498,9 +1498,9 @@ PostgresMain(int argc, char *argv[], const char *username)
14981498
{
14991499
case 'p':
15001500
if (optarg[1] == 'a')
1501-
tmp = "show_parser_stats";
1501+
tmp = "log_parser_stats";
15021502
else if (optarg[1] == 'l')
1503-
tmp = "show_planner_stats";
1503+
tmp = "log_planner_stats";
15041504
else
15051505
errs++;
15061506
break;
@@ -1607,8 +1607,8 @@ PostgresMain(int argc, char *argv[], const char *username)
16071607
/*
16081608
* Post-processing for command line options.
16091609
*/
1610-
if (Show_statement_stats &&
1611-
(Show_parser_stats || Show_planner_stats || Show_executor_stats))
1610+
if (log_statement_stats &&
1611+
(log_parser_stats || log_planner_stats || log_executor_stats))
16121612
{
16131613
elog(WARNING, "Query statistics are disabled because parser, planner, or executor statistics are on.");
16141614
SetConfigOption("show_statement_stats", "false", ctx, gucsource);
@@ -1781,7 +1781,7 @@ PostgresMain(int argc, char *argv[], const char *username)
17811781
if (!IsUnderPostmaster)
17821782
{
17831783
puts("\nPOSTGRES backend interactive interface ");
1784-
puts("$Revision: 1.308 $ $Date: 2002/11/14 23:53:27 $\n");
1784+
puts("$Revision: 1.309 $ $Date: 2002/11/15 00:47:22 $\n");
17851785
}
17861786

17871787
/*
@@ -2008,7 +2008,7 @@ PostgresMain(int argc, char *argv[], const char *username)
20082008
* Note: transaction command start/end is now done within
20092009
* pg_exec_query_string(), not here.
20102010
*/
2011-
if (Show_statement_stats)
2011+
if (log_statement_stats)
20122012
ResetUsage();
20132013

20142014
pgstat_report_activity(parser_input->data);
@@ -2017,7 +2017,7 @@ PostgresMain(int argc, char *argv[], const char *username)
20172017
whereToSendOutput,
20182018
QueryContext);
20192019

2020-
if (Show_statement_stats)
2020+
if (log_statement_stats)
20212021
ShowUsage("QUERY STATISTICS");
20222022
}
20232023
break;

src/backend/utils/misc/guc.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* command, configuration file, and command line options.
66
* See src/backend/utils/misc/README for more information.
77
*
8-
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.101 2002/11/14 23:53:27 momjian Exp $
8+
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.102 2002/11/15 00:47:22 momjian Exp $
99
*
1010
* Copyright 2000 by PostgreSQL Global Development Group
1111
* Written by Peter Eisentraut <peter_e@gmx.net>.
@@ -79,17 +79,17 @@ static const char *assign_msglvl(int *var, const char *newval,
7979
#ifdef USE_ASSERT_CHECKING
8080
bool assert_enabled = true;
8181
#endif
82-
bool Log_statement = false;
83-
bool Log_duration = false;
82+
bool log_statement = false;
83+
bool log_duration = false;
8484
bool Debug_print_plan = false;
8585
bool Debug_print_parse = false;
8686
bool Debug_print_rewritten = false;
8787
bool Debug_pretty_print = false;
8888

89-
bool Show_parser_stats = false;
90-
bool Show_planner_stats = false;
91-
bool Show_executor_stats = false;
92-
bool Show_statement_stats = false; /* this is sort of all
89+
bool log_parser_stats = false;
90+
bool log_planner_stats = false;
91+
bool log_executor_stats = false;
92+
bool log_statement_stats = false; /* this is sort of all
9393
* three above together */
9494
bool Show_btree_build_stats = false;
9595

@@ -378,11 +378,11 @@ static struct config_bool
378378
#endif
379379

380380
{
381-
{"log_statement", PGC_USERSET}, &Log_statement,
381+
{"log_statement", PGC_USERSET}, &log_statement,
382382
false, NULL, NULL
383383
},
384384
{
385-
{"log_duration", PGC_USERSET}, &Log_duration,
385+
{"log_duration", PGC_USERSET}, &log_duration,
386386
false, NULL, NULL
387387
},
388388
{
@@ -403,19 +403,19 @@ static struct config_bool
403403
},
404404

405405
{
406-
{"show_parser_stats", PGC_USERSET}, &Show_parser_stats,
406+
{"log_parser_stats", PGC_USERSET}, &log_parser_stats,
407407
false, NULL, NULL
408408
},
409409
{
410-
{"show_planner_stats", PGC_USERSET}, &Show_planner_stats,
410+
{"log_planner_stats", PGC_USERSET}, &log_planner_stats,
411411
false, NULL, NULL
412412
},
413413
{
414-
{"show_executor_stats", PGC_USERSET}, &Show_executor_stats,
414+
{"log_executor_stats", PGC_USERSET}, &log_executor_stats,
415415
false, NULL, NULL
416416
},
417417
{
418-
{"show_statement_stats", PGC_USERSET}, &Show_statement_stats,
418+
{"log_statement_stats", PGC_USERSET}, &log_statement_stats,
419419
false, NULL, NULL
420420
},
421421
#ifdef BTREE_BUILD_STATS

src/backend/utils/misc/postgresql.conf.sample

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,10 @@
152152
#
153153
# Statistics
154154
#
155-
#show_parser_stats = false
156-
#show_planner_stats = false
157-
#show_executor_stats = false
158-
#show_statement_stats = false
155+
#log_parser_stats = false
156+
#log_planner_stats = false
157+
#log_executor_stats = false
158+
#log_statement_stats = false
159159

160160
# requires BTREE_BUILD_STATS
161161
#show_btree_build_stats = false

src/bin/psql/tab-complete.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000-2002 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.66 2002/11/14 23:53:27 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.67 2002/11/15 00:47:22 momjian Exp $
77
*/
88

99
/*----------------------------------------------------------------------
@@ -238,10 +238,10 @@ psql_completion(char *text, int start, int end)
238238
"debug_print_rewritten",
239239
"debug_print_plan",
240240
"debug_pretty_print",
241-
"show_parser_stats",
242-
"show_planner_stats",
243-
"show_executor_stats",
244-
"show_statement_stats",
241+
"log_parser_stats",
242+
"log_planner_stats",
243+
"log_executor_stats",
244+
"log_statement_stats",
245245
"trace_notify",
246246
"explain_pretty_print",
247247
"sql_inheritance",

src/include/utils/guc.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* External declarations pertaining to backend/utils/misc/guc.c and
55
* backend/utils/misc/guc-file.l
66
*
7-
* $Id: guc.h,v 1.25 2002/11/14 23:53:27 momjian Exp $
7+
* $Id: guc.h,v 1.26 2002/11/15 00:47:22 momjian Exp $
88
*/
99
#ifndef GUC_H
1010
#define GUC_H
@@ -107,18 +107,18 @@ extern const char *assign_log_min_messages(const char *newval,
107107
bool doit, bool interactive);
108108
extern const char *assign_client_min_messages(const char *newval,
109109
bool doit, bool interactive);
110-
extern bool Log_statement;
111-
extern bool Log_duration;
110+
extern bool log_statement;
111+
extern bool log_duration;
112112
extern bool Debug_print_plan;
113113
extern bool Debug_print_parse;
114114
extern bool Debug_print_rewritten;
115115
extern bool Debug_pretty_print;
116116

117-
extern bool Show_parser_stats;
118-
extern bool Show_planner_stats;
119-
extern bool Show_executor_stats;
120-
extern bool Show_statement_stats;
121-
extern bool Show_btree_build_stats;
117+
extern bool log_parser_stats;
118+
extern bool log_planner_stats;
119+
extern bool log_executor_stats;
120+
extern bool log_statement_stats;
121+
extern bool log_btree_build_stats;
122122

123123
extern bool Explain_pretty_print;
124124

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