diff options
| author | Tom Lane | 2007-05-27 03:50:39 +0000 |
|---|---|---|
| committer | Tom Lane | 2007-05-27 03:50:39 +0000 |
| commit | 77947c51c08179b8bc12347a7fbcb2c8d7908302 (patch) | |
| tree | 0a306ea177817fdadc0e4421b6d8dd212c11e6e3 /src/include/utils | |
| parent | cadb78330eedceafeda99bf12ac690cda773be62 (diff) | |
Fix up pgstats counting of live and dead tuples to recognize that committed
and aborted transactions have different effects; also teach it not to assume
that prepared transactions are always committed.
Along the way, simplify the pgstats API by tying counting directly to
Relations; I cannot detect any redeeming social value in having stats
pointers in HeapScanDesc and IndexScanDesc structures. And fix a few
corner cases in which counts might be missed because the relation's
pgstat_info pointer hadn't been set.
Diffstat (limited to 'src/include/utils')
| -rw-r--r-- | src/include/utils/rel.h | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h index 33795de2bf8..bc6bf190b86 100644 --- a/src/include/utils/rel.h +++ b/src/include/utils/rel.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/rel.h,v 1.100 2007/03/29 00:15:39 tgl Exp $ + * $PostgreSQL: pgsql/src/include/utils/rel.h,v 1.101 2007/05/27 03:50:39 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -90,15 +90,6 @@ typedef struct TriggerDesc /* - * Same for the statistics collector data in Relation and scan data. - */ -typedef struct PgStat_Info -{ - void *tabentry; -} PgStat_Info; - - -/* * Cached lookup information for the index access method functions defined * by the pg_am row associated with an index relation. */ @@ -200,8 +191,8 @@ typedef struct RelationData List *rd_indpred; /* index predicate tree, if any */ void *rd_amcache; /* available for use by index AM */ - /* statistics collection area */ - PgStat_Info pgstat_info; + /* use "struct" here to avoid needing to include pgstat.h: */ + struct PgStat_TableStatus *pgstat_info; /* statistics collection area */ } RelationData; typedef RelationData *Relation; |
