1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

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.
This commit is contained in:
Tom Lane
2006-06-19 01:51:22 +00:00
parent 6075feed40
commit b13c9686d0
11 changed files with 880 additions and 1198 deletions

View File

@ -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 $
*
*--------------------------------------------------------------------
*/
@ -700,16 +700,6 @@ static struct config_bool ConfigureNamesBool[] =
&pgstat_collect_resetonpmstart,
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."),
@ -727,6 +717,17 @@ static struct config_bool ConfigureNamesBool[] =
false, NULL, NULL
},
{
{"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."),