summaryrefslogtreecommitdiff
path: root/src/include/pgstat.h
diff options
context:
space:
mode:
authorTom Lane2006-04-06 20:38:00 +0000
committerTom Lane2006-04-06 20:38:00 +0000
commit0914ae1c1481c2721d57d1c4c3da95a1e0582f7a (patch)
tree65b90dd4ce49e58b3d919a8f3c2aefe7ccaf0830 /src/include/pgstat.h
parent0bc2a8ca6556de179468b4eea84cb67b38322414 (diff)
Remove the pgstats logic for delaying destruction of stats table entries.
Per recent discussion, this seems to be making the stats less accurate rather than more so, particularly on Windows where PID values may be reused very quickly. Patch by Peter Brant.
Diffstat (limited to 'src/include/pgstat.h')
-rw-r--r--src/include/pgstat.h27
1 files changed, 5 insertions, 22 deletions
diff --git a/src/include/pgstat.h b/src/include/pgstat.h
index 2442559b21..00631b3e12 100644
--- a/src/include/pgstat.h
+++ b/src/include/pgstat.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 2001-2006, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/include/pgstat.h,v 1.42 2006/03/05 15:58:53 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/pgstat.h,v 1.43 2006/04/06 20:38:00 tgl Exp $
* ----------
*/
#ifndef PGSTAT_H
@@ -271,16 +271,18 @@ typedef union PgStat_Msg
* ------------------------------------------------------------
*/
-#define PGSTAT_FILE_FORMAT_ID 0x01A5BC94
+#define PGSTAT_FILE_FORMAT_ID 0x01A5BC95
/* ----------
* PgStat_StatDBEntry The collector's data per database
+ *
+ * Note: n_backends is not maintained within the collector. It's computed
+ * when a backend reads the stats file for use.
* ----------
*/
typedef struct PgStat_StatDBEntry
{
Oid databaseid;
- int destroy;
int n_backends;
PgStat_Counter n_xact_commit;
PgStat_Counter n_xact_rollback;
@@ -326,31 +328,12 @@ typedef struct PgStat_StatBeEntry
/* ----------
- * PgStat_StatBeDead Because UDP packets can arrive out of
- * order, we need to keep some information
- * about backends that are known to be
- * dead for some seconds. This info is held
- * in a hash table of these structs.
- *
- * (This struct is not used in the stats file.)
- * ----------
- */
-typedef struct PgStat_StatBeDead
-{
- int procpid;
- int backendid;
- int destroy;
-} PgStat_StatBeDead;
-
-
-/* ----------
* PgStat_StatTabEntry The collector's data per table (or index)
* ----------
*/
typedef struct PgStat_StatTabEntry
{
Oid tableid;
- int destroy;
PgStat_Counter numscans;