pgsql: Fix up pgstats counting of live and dead tuples to recognize that

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix up pgstats counting of live and dead tuples to recognize that
Date: 2007-05-27 03:50:40
Message-ID: 20070527035040.1EE4B9FB46F@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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.

Modified Files:
--------------
pgsql/src/backend/access/gin:
ginscan.c (r1.9 -> r1.10)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gin/ginscan.c.diff?r1=1.9&r2=1.10)
pgsql/src/backend/access/gist:
gistget.c (r1.65 -> r1.66)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gist/gistget.c.diff?r1=1.65&r2=1.66)
pgsql/src/backend/access/hash:
hashsearch.c (r1.49 -> r1.50)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/hash/hashsearch.c.diff?r1=1.49&r2=1.50)
pgsql/src/backend/access/heap:
heapam.c (r1.232 -> r1.233)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/heap/heapam.c.diff?r1=1.232&r2=1.233)
pgsql/src/backend/access/index:
genam.c (r1.61 -> r1.62)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/index/genam.c.diff?r1=1.61&r2=1.62)
indexam.c (r1.97 -> r1.98)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/index/indexam.c.diff?r1=1.97&r2=1.98)
pgsql/src/backend/access/nbtree:
nbtsearch.c (r1.112 -> r1.113)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/nbtree/nbtsearch.c.diff?r1=1.112&r2=1.113)
pgsql/src/backend/access/transam:
twophase.c (r1.30 -> r1.31)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/twophase.c.diff?r1=1.30&r2=1.31)
twophase_rmgr.c (r1.4 -> r1.5)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/twophase_rmgr.c.diff?r1=1.4&r2=1.5)
xact.c (r1.242 -> r1.243)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xact.c.diff?r1=1.242&r2=1.243)
pgsql/src/backend/executor:
nodeBitmapHeapscan.c (r1.16 -> r1.17)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeBitmapHeapscan.c.diff?r1=1.16&r2=1.17)
pgsql/src/backend/postmaster:
bgwriter.c (r1.37 -> r1.38)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/bgwriter.c.diff?r1=1.37&r2=1.38)
pgstat.c (r1.155 -> r1.156)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/pgstat.c.diff?r1=1.155&r2=1.156)
pgsql/src/backend/storage/buffer:
bufmgr.c (r1.218 -> r1.219)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/buffer/bufmgr.c.diff?r1=1.218&r2=1.219)
pgsql/src/backend/utils/cache:
relcache.c (r1.260 -> r1.261)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/relcache.c.diff?r1=1.260&r2=1.261)
pgsql/src/include/access:
heapam.h (r1.123 -> r1.124)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/access/heapam.h.diff?r1=1.123&r2=1.124)
relscan.h (r1.52 -> r1.53)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/access/relscan.h.diff?r1=1.52&r2=1.53)
twophase_rmgr.h (r1.4 -> r1.5)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/access/twophase_rmgr.h.diff?r1=1.4&r2=1.5)
pgsql/src/include:
pgstat.h (r1.58 -> r1.59)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/pgstat.h.diff?r1=1.58&r2=1.59)
pgsql/src/include/utils:
rel.h (r1.100 -> r1.101)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/rel.h.diff?r1=1.100&r2=1.101)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2007-05-27 05:37:50 pgsql: pgstat's on-proc-exit hook has to execute after the last
Previous Message User Eggyknap 2007-05-27 03:26:11 pgsnmpd - pgsnmpd: Change default vendor name per suggestion from Dave