diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 8f6ffa9a1a..c8572f8d55 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -1,4 +1,4 @@ - + Server Configuration @@ -2878,7 +2878,7 @@ SELECT * FROM parent WHERE key = 2400; Enables the collection of information on the currently executing command of each session, along with the time at - which that command began execution. This parameter is off by + which that command began execution. This parameter is on by default. Note that even when enabled, this information is not visible to all users, only to superusers and the user owning the session being reported on; so it should not represent a diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 54c6b4f973..11cbb5ff33 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -1,4 +1,4 @@ - + Monitoring Database Activity @@ -170,12 +170,11 @@ postgres: user database host - Since the parameters stats_command_string, - stats_block_level, and + Since the parameters stats_block_level, and stats_row_level default to false, very few statistics are collected in the default - configuration. Enabling one or more of these configuration - variables will significantly enhance the amount of useful data + configuration. Enabling either of these configuration + variables will significantly increase the amount of useful data produced by the statistics facilities, at the expense of additional run-time overhead. @@ -241,9 +240,9 @@ postgres: user database host ID, user OID, user name, current query, time at which the current query began execution, time at which the process was started, and client's address and port number. The columns - that report data on the current query are only available if the + that report data on the current query are available unless the parameter stats_command_string has been - turned on. Furthermore, these columns read as null unless the + turned off. Furthermore, these columns are only visible if the user examining the view is a superuser or the same as the user owning the process being reported on. @@ -635,10 +634,10 @@ postgres: user database host pg_stat_get_backend_activity(integer) text - Active command of the given server process (null if the - current user is not a superuser nor the same user as that of - the session being queried, or - stats_command_string is not on) + Active command of the given server process, but only if the + current user is a superuser or the same user as that of + the session being queried (and + stats_command_string is on) @@ -647,10 +646,10 @@ postgres: user database host timestamp with time zone The time at which the given server process' currently - executing query was started (null if the - current user is not a superuser nor the same user as that of - the session being queried, or - stats_command_string is not on) + executing query was started, but only if the + current user is a superuser or the same user as that of + the session being queried (and + stats_command_string is on) diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 8c3931c838..72041bbef7 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -10,7 +10,7 @@ * Written by Peter Eisentraut . * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.322 2006/06/19 01:51:21 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.323 2006/06/27 19:07:50 momjian Exp $ * *-------------------------------------------------------------------- */ @@ -725,7 +725,7 @@ static struct config_bool ConfigureNamesBool[] = "at which that command began execution.") }, &pgstat_collect_querystring, - false, NULL, NULL + true, NULL, NULL }, { diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index 26b2be6d6e..88d872fbec 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -322,7 +322,7 @@ # - Query/Index Statistics Collector - -#stats_command_string = off +#stats_command_string = on #stats_start_collector = on # needed for block or row stats #stats_block_level = off #stats_row_level = off