aboutsummaryrefslogtreecommitdiff
path: root/src/backend/postmaster/postmaster.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/postmaster/postmaster.c
parent6075feed40804a963f9a7c041e7d157a86cc758d (diff)
downloadpostgresql-b13c9686d08411a284afeb881b49d7955761d8cb.tar.gz
postgresql-b13c9686d08411a284afeb881b49d7955761d8cb.zip
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/postmaster/postmaster.c')
-rw-r--r--src/backend/postmaster/postmaster.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index fc4a9bcdc33..aac116b466a 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.486 2006/06/18 15:38:37 petere Exp $
+ * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.487 2006/06/19 01:51:21 tgl Exp $
*
* NOTES
*
@@ -2109,9 +2109,6 @@ reaper(SIGNAL_ARGS)
{
AutoVacPID = 0;
autovac_stopped();
- /* Tell the collector about process termination */
- pgstat_beterm(pid);
-
if (exitstatus != 0)
HandleChildCrash(pid, exitstatus,
_("autovacuum process"));
@@ -2252,8 +2249,6 @@ CleanupBackend(int pid,
#ifdef EXEC_BACKEND
ShmemBackendArrayRemove(pid);
#endif
- /* Tell the collector about backend termination */
- pgstat_beterm(pid);
break;
}
}
@@ -2299,8 +2294,6 @@ HandleChildCrash(int pid, int exitstatus, const char *procname)
#ifdef EXEC_BACKEND
ShmemBackendArrayRemove(pid);
#endif
- /* Tell the collector about backend termination */
- pgstat_beterm(pid);
/* Keep looping so we can signal remaining backends */
}
else