<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.151 2002/11/14 23:53:26 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.152 2002/11/15 00:47:22 momjian Exp $
-->
<Chapter Id="runtime">
</varlistentry>
<varlistentry>
- <term><varname>SHOW_STATEMENT_STATS</varname> (<type>boolean</type>)</term>
- <term><varname>SHOW_PARSER_STATS</varname> (<type>boolean</type>)</term>
- <term><varname>SHOW_PLANNER_STATS</varname> (<type>boolean</type>)</term>
- <term><varname>SHOW_EXECUTOR_STATS</varname> (<type>boolean</type>)</term>
+ <term><varname>LOG_STATEMENT_STATS</varname> (<type>boolean</type>)</term>
+ <term><varname>LOG_PARSER_STATS</varname> (<type>boolean</type>)</term>
+ <term><varname>LOG_PLANNER_STATS</varname> (<type>boolean</type>)</term>
+ <term><varname>LOG_EXECUTOR_STATS</varname> (<type>boolean</type>)</term>
<listitem>
<para>
For each query, write performance statistics of the respective
<row>
<entry><option>-tpa</option>, <option>-tpl</option>, <option>-te</option><footnoteref linkend="fn.runtime-config-short"></entry>
- <entry><literal>show_parser_stats=on</>, <literal>show_planner_stats=on</>, <literal>show_executor_stats=on</></entry>
+ <entry><literal>log_parser_stats=on</>,
+ <literal>log_planner_stats=on</>,
+ <literal>log_executor_stats=on</></entry>
</row>
</tbody>
</tgroup>
* Copyright (c) 2002, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/prepare.c,v 1.7 2002/11/13 00:39:46 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/prepare.c,v 1.8 2002/11/15 00:47:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
QueryDesc *qdesc;
EState *state;
- if (Show_executor_stats)
+ if (log_executor_stats)
ResetUsage();
qdesc = CreateQueryDesc(query, plan, outputDest, NULL);
RunQuery(qdesc, state);
- if (Show_executor_stats)
+ if (log_executor_stats)
ShowUsage("EXECUTOR STATISTICS");
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.308 2002/11/14 23:53:27 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.309 2002/11/15 00:47:22 momjian Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
{
List *raw_parsetree_list;
- if (Log_statement)
+ if (log_statement)
elog(LOG, "query: %s", query_string->data);
- if (Show_parser_stats)
+ if (log_parser_stats)
ResetUsage();
raw_parsetree_list = parser(query_string, typev, nargs);
- if (Show_parser_stats)
+ if (log_parser_stats)
ShowUsage("PARSER STATISTICS");
return raw_parsetree_list;
/*
* (1) Perform parse analysis.
*/
- if (Show_parser_stats)
+ if (log_parser_stats)
ResetUsage();
querytree_list = parse_analyze(parsetree, NULL);
- if (Show_parser_stats)
+ if (log_parser_stats)
{
ShowUsage("PARSE ANALYSIS STATISTICS");
ResetUsage();
querytree_list = new_list;
- if (Show_parser_stats)
+ if (log_parser_stats)
ShowUsage("REWRITER STATISTICS");
#ifdef COPY_PARSE_PLAN_TREES
if (querytree->commandType == CMD_UTILITY)
return NULL;
- if (Show_planner_stats)
+ if (log_planner_stats)
ResetUsage();
/* call the optimizer */
plan = planner(querytree);
- if (Show_planner_stats)
+ if (log_planner_stats)
ShowUsage("PLANNER STATISTICS");
#ifdef COPY_PARSE_PLAN_TREES
*parsetree_item;
struct timeval start_t,
stop_t;
- bool save_Log_duration = Log_duration;
+ bool save_log_duration = log_duration;
debug_query_string = query_string->data;
/*
- * We use save_Log_duration so "SET Log_duration = true" doesn't
+ * We use save_log_duration so "SET log_duration = true" doesn't
* report incorrect time because gettimeofday() wasn't called.
*/
- if (save_Log_duration)
+ if (save_log_duration)
gettimeofday(&start_t, NULL);
/*
/*
* execute the plan
*/
- if (Show_executor_stats)
+ if (log_executor_stats)
ResetUsage();
if (dontExecute)
}
}
- if (Show_executor_stats)
+ if (log_executor_stats)
ShowUsage("EXECUTOR STATISTICS");
}
if (xact_started)
finish_xact_command(false);
- if (save_Log_duration)
+ if (save_log_duration)
{
gettimeofday(&stop_t, NULL);
if (stop_t.tv_usec < start_t.tv_usec)
{
case 'p':
if (optarg[1] == 'a')
- tmp = "show_parser_stats";
+ tmp = "log_parser_stats";
else if (optarg[1] == 'l')
- tmp = "show_planner_stats";
+ tmp = "log_planner_stats";
else
errs++;
break;
/*
* Post-processing for command line options.
*/
- if (Show_statement_stats &&
- (Show_parser_stats || Show_planner_stats || Show_executor_stats))
+ if (log_statement_stats &&
+ (log_parser_stats || log_planner_stats || log_executor_stats))
{
elog(WARNING, "Query statistics are disabled because parser, planner, or executor statistics are on.");
SetConfigOption("show_statement_stats", "false", ctx, gucsource);
if (!IsUnderPostmaster)
{
puts("\nPOSTGRES backend interactive interface ");
- puts("$Revision: 1.308 $ $Date: 2002/11/14 23:53:27 $\n");
+ puts("$Revision: 1.309 $ $Date: 2002/11/15 00:47:22 $\n");
}
/*
* Note: transaction command start/end is now done within
* pg_exec_query_string(), not here.
*/
- if (Show_statement_stats)
+ if (log_statement_stats)
ResetUsage();
pgstat_report_activity(parser_input->data);
whereToSendOutput,
QueryContext);
- if (Show_statement_stats)
+ if (log_statement_stats)
ShowUsage("QUERY STATISTICS");
}
break;
* command, configuration file, and command line options.
* See src/backend/utils/misc/README for more information.
*
- * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.101 2002/11/14 23:53:27 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.102 2002/11/15 00:47:22 momjian Exp $
*
* Copyright 2000 by PostgreSQL Global Development Group
* Written by Peter Eisentraut <peter_e@gmx.net>.
#ifdef USE_ASSERT_CHECKING
bool assert_enabled = true;
#endif
-bool Log_statement = false;
-bool Log_duration = false;
+bool log_statement = false;
+bool log_duration = false;
bool Debug_print_plan = false;
bool Debug_print_parse = false;
bool Debug_print_rewritten = false;
bool Debug_pretty_print = false;
-bool Show_parser_stats = false;
-bool Show_planner_stats = false;
-bool Show_executor_stats = false;
-bool Show_statement_stats = false; /* this is sort of all
+bool log_parser_stats = false;
+bool log_planner_stats = false;
+bool log_executor_stats = false;
+bool log_statement_stats = false; /* this is sort of all
* three above together */
bool Show_btree_build_stats = false;
#endif
{
- {"log_statement", PGC_USERSET}, &Log_statement,
+ {"log_statement", PGC_USERSET}, &log_statement,
false, NULL, NULL
},
{
- {"log_duration", PGC_USERSET}, &Log_duration,
+ {"log_duration", PGC_USERSET}, &log_duration,
false, NULL, NULL
},
{
},
{
- {"show_parser_stats", PGC_USERSET}, &Show_parser_stats,
+ {"log_parser_stats", PGC_USERSET}, &log_parser_stats,
false, NULL, NULL
},
{
- {"show_planner_stats", PGC_USERSET}, &Show_planner_stats,
+ {"log_planner_stats", PGC_USERSET}, &log_planner_stats,
false, NULL, NULL
},
{
- {"show_executor_stats", PGC_USERSET}, &Show_executor_stats,
+ {"log_executor_stats", PGC_USERSET}, &log_executor_stats,
false, NULL, NULL
},
{
- {"show_statement_stats", PGC_USERSET}, &Show_statement_stats,
+ {"log_statement_stats", PGC_USERSET}, &log_statement_stats,
false, NULL, NULL
},
#ifdef BTREE_BUILD_STATS
#
# Statistics
#
-#show_parser_stats = false
-#show_planner_stats = false
-#show_executor_stats = false
-#show_statement_stats = false
+#log_parser_stats = false
+#log_planner_stats = false
+#log_executor_stats = false
+#log_statement_stats = false
# requires BTREE_BUILD_STATS
#show_btree_build_stats = false
*
* Copyright 2000-2002 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.66 2002/11/14 23:53:27 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.67 2002/11/15 00:47:22 momjian Exp $
*/
/*----------------------------------------------------------------------
"debug_print_rewritten",
"debug_print_plan",
"debug_pretty_print",
- "show_parser_stats",
- "show_planner_stats",
- "show_executor_stats",
- "show_statement_stats",
+ "log_parser_stats",
+ "log_planner_stats",
+ "log_executor_stats",
+ "log_statement_stats",
"trace_notify",
"explain_pretty_print",
"sql_inheritance",
* External declarations pertaining to backend/utils/misc/guc.c and
* backend/utils/misc/guc-file.l
*
- * $Id: guc.h,v 1.25 2002/11/14 23:53:27 momjian Exp $
+ * $Id: guc.h,v 1.26 2002/11/15 00:47:22 momjian Exp $
*/
#ifndef GUC_H
#define GUC_H
bool doit, bool interactive);
extern const char *assign_client_min_messages(const char *newval,
bool doit, bool interactive);
-extern bool Log_statement;
-extern bool Log_duration;
+extern bool log_statement;
+extern bool log_duration;
extern bool Debug_print_plan;
extern bool Debug_print_parse;
extern bool Debug_print_rewritten;
extern bool Debug_pretty_print;
-extern bool Show_parser_stats;
-extern bool Show_planner_stats;
-extern bool Show_executor_stats;
-extern bool Show_statement_stats;
-extern bool Show_btree_build_stats;
+extern bool log_parser_stats;
+extern bool log_planner_stats;
+extern bool log_executor_stats;
+extern bool log_statement_stats;
+extern bool log_btree_build_stats;
extern bool Explain_pretty_print;