summaryrefslogtreecommitdiff
path: root/src/backend/utils/misc/guc.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-06-19 01:51:22 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-06-19 01:51:22 +0000
commitb13c9686d08411a284afeb881b49d7955761d8cb (patch)
treeec956d8cc1a3176b73b064d711ce5ccda547e23b /src/backend/utils/misc/guc.c
parent6075feed40804a963f9a7c041e7d157a86cc758d (diff)
downloadpostgresql-b13c9686d08411a284afeb881b49d7955761d8cb.tar.gz
Take the statistics collector out of the loop for monitoring backends'
current commands; instead, store current-status information in shared memory. This substantially reduces the overhead of stats_command_string and also ensures that pg_stat_activity is fully up to date at all times. Per my recent proposal.
Diffstat (limited to 'src/backend/utils/misc/guc.c')
-rw-r--r--src/backend/utils/misc/guc.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 9ef561d4c1..8c3931c838 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -10,7 +10,7 @@
* Written by Peter Eisentraut <peter_e@gmx.net>.
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.321 2006/06/05 02:49:58 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.322 2006/06/19 01:51:21 tgl Exp $
*
*--------------------------------------------------------------------
*/
@@ -701,16 +701,6 @@ static struct config_bool ConfigureNamesBool[] =
false, NULL, NULL
},
{
- {"stats_command_string", PGC_SUSET, STATS_COLLECTOR,
- gettext_noop("Collects statistics about executing commands."),
- gettext_noop("Enables the collection of statistics on the currently "
- "executing command of each session, along with the time "
- "at which that command began execution.")
- },
- &pgstat_collect_querystring,
- false, NULL, NULL
- },
- {
{"stats_row_level", PGC_SUSET, STATS_COLLECTOR,
gettext_noop("Collects row-level statistics on database activity."),
NULL
@@ -728,6 +718,17 @@ static struct config_bool ConfigureNamesBool[] =
},
{
+ {"stats_command_string", PGC_SUSET, STATS_COLLECTOR,
+ gettext_noop("Collects information about executing commands."),
+ gettext_noop("Enables the collection of information on the currently "
+ "executing command of each session, along with the time "
+ "at which that command began execution.")
+ },
+ &pgstat_collect_querystring,
+ false, NULL, NULL
+ },
+
+ {
{"autovacuum", PGC_SIGHUP, AUTOVACUUM,
gettext_noop("Starts the autovacuum subprocess."),
NULL