Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit665c5e8

Browse files
committed
Default stats_command_string to 'on', now that its overhead is minimal.
1 parent3c71244 commit665c5e8

File tree

4 files changed

+19
-20
lines changed

4 files changed

+19
-20
lines changed

‎doc/src/sgml/config.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.66 2006/06/19 01:51:21 tgl Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.67 2006/06/27 19:07:50 momjian Exp $ -->
22

33
<chapter Id="runtime-config">
44
<title>Server Configuration</title>
@@ -2878,7 +2878,7 @@ SELECT * FROM parent WHERE key = 2400;
28782878
<para>
28792879
Enables the collection of information on the currently
28802880
executing command of each session, along with the time at
2881-
which that command began execution. This parameter isoff by
2881+
which that command began execution. This parameter ison by
28822882
default. Note that even when enabled, this information is not
28832883
visible to all users, only to superusers and the user owning
28842884
the session being reported on; so it should not represent a

‎doc/src/sgml/monitoring.sgml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/monitoring.sgml,v 1.34 2006/06/19 01:51:21 tgl Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/monitoring.sgml,v 1.35 2006/06/27 19:07:50 momjian Exp $ -->
22

33
<chapter id="monitoring">
44
<title>Monitoring Database Activity</title>
@@ -170,12 +170,11 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
170170

171171
<note>
172172
<para>
173-
Since the parameters <varname>stats_command_string</varname>,
174-
<varname>stats_block_level</varname>, and
173+
Since the parameters <varname>stats_block_level</varname>, and
175174
<varname>stats_row_level</varname> default to <literal>false</>,
176175
very few statistics are collected in the default
177-
configuration. Enablingone or more of these configuration
178-
variables will significantlyenhance the amount of useful data
176+
configuration. Enablingeither of these configuration
177+
variables will significantlyincrease the amount of useful data
179178
produced by the statistics facilities, at the expense of
180179
additional run-time overhead.
181180
</para>
@@ -241,9 +240,9 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
241240
process <acronym>ID</>, user OID, user name, current query, time at
242241
which the current query began execution, time at which the process
243242
was started, and client's address and port number. The columns
244-
that report data on the current query areonlyavailableif the
243+
that report data on the current query are availableunless the
245244
parameter <varname>stats_command_string</varname> has been
246-
turnedon. Furthermore, these columnsread as null unless the
245+
turnedoff. Furthermore, these columnsare only visible if the
247246
user examining the view is a superuser or the same as the user
248247
owning the process being reported on.
249248
</entry>
@@ -635,10 +634,10 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
635634
<entry><literal><function>pg_stat_get_backend_activity</function>(<type>integer</type>)</literal></entry>
636635
<entry><type>text</type></entry>
637636
<entry>
638-
Active command of the given server process (null if the
639-
current user isnota superusernor the same user as that of
640-
the session being queried, or
641-
<varname>stats_command_string</varname> isnoton)
637+
Active command of the given server process, but only if the
638+
current user is a superuseror the same user as that of
639+
the session being queried (and
640+
<varname>stats_command_string</varname> is on)
642641
</entry>
643642
</row>
644643

@@ -647,10 +646,10 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
647646
<entry><type>timestamp with time zone</type></entry>
648647
<entry>
649648
The time at which the given server process' currently
650-
executing query was started (null if the
651-
current user isnota superusernor the same user as that of
652-
the session being queried, or
653-
<varname>stats_command_string</varname> isnoton)
649+
executing query was started, but only if the
650+
current user is a superuseror the same user as that of
651+
the session being queried (and
652+
<varname>stats_command_string</varname> is on)
654653
</entry>
655654
</row>
656655

‎src/backend/utils/misc/guc.c

Lines changed: 2 additions & 2 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.322 2006/06/19 01:51:21 tgl Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.323 2006/06/27 19:07:50 momjian Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -725,7 +725,7 @@ static struct config_bool ConfigureNamesBool[] =
725725
"at which that command began execution.")
726726
},
727727
&pgstat_collect_querystring,
728-
false,NULL,NULL
728+
true,NULL,NULL
729729
},
730730

731731
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@
322322

323323
# - Query/Index Statistics Collector -
324324

325-
#stats_command_string =off
325+
#stats_command_string =on
326326
#stats_start_collector = on# needed for block or row stats
327327
#stats_block_level = off
328328
#stats_row_level = off

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp