diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-05-27 03:50:39 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-05-27 03:50:39 +0000 |
| commit | 77947c51c08179b8bc12347a7fbcb2c8d7908302 (patch) | |
| tree | 0a306ea177817fdadc0e4421b6d8dd212c11e6e3 /src/backend/access/hash | |
| parent | cadb78330eedceafeda99bf12ac690cda773be62 (diff) | |
| download | postgresql-77947c51c08179b8bc12347a7fbcb2c8d7908302.tar.gz | |
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/backend/access/hash')
| -rw-r--r-- | src/backend/access/hash/hashsearch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/access/hash/hashsearch.c b/src/backend/access/hash/hashsearch.c index 5de0f40229..104a0c14de 100644 --- a/src/backend/access/hash/hashsearch.c +++ b/src/backend/access/hash/hashsearch.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/hash/hashsearch.c,v 1.49 2007/05/03 16:45:58 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/access/hash/hashsearch.c,v 1.50 2007/05/27 03:50:38 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -127,7 +127,7 @@ _hash_first(IndexScanDesc scan, ScanDirection dir) ItemPointer current; OffsetNumber offnum; - pgstat_count_index_scan(&scan->xs_pgstat_info); + pgstat_count_index_scan(rel); current = &(so->hashso_curpos); ItemPointerSetInvalid(current); |
