]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Teach ANALYZE to distinguish dead and in-doubt tuples, which it formerly
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 3 Apr 2008 16:27:32 +0000 (16:27 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 3 Apr 2008 16:27:32 +0000 (16:27 +0000)
commitaffdd52d5fd5818954f0ef62278e84774549f8ee
tree20af01140f78af9ecd654c5d73c72bf5f079fe28
parentdb6c80de8b48afedb38e1f88d72546ee6338d7d6
Teach ANALYZE to distinguish dead and in-doubt tuples, which it formerly
classed all as "dead"; also get it to count DEAD item pointers as dead rows,
instead of ignoring them as before.  Also improve matters so that tuples
previously inserted or deleted by our own transaction are handled nicely:
the stats collector's live-tuple and dead-tuple counts will end up correct
after our transaction ends, regardless of whether we end in commit or abort.

While there's more work that could be done to improve the counting of in-doubt
tuples in both VACUUM and ANALYZE, this commit is enough to alleviate some
known bad behaviors in 8.3; and the other stuff that's been discussed seems
like research projects anyway.

Pavan Deolasee and Tom Lane
src/backend/commands/analyze.c
src/backend/postmaster/pgstat.c
src/include/pgstat.h