pgsql: Teach ANALYZE to distinguish dead and in-doubt tuples, which it

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Teach ANALYZE to distinguish dead and in-doubt tuples, which it
Date: 2008-04-03 16:27:25
Message-ID: 20080403162725.775497558E7@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Modified Files:
--------------
pgsql/src/backend/commands:
analyze.c (r1.116 -> r1.117)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/analyze.c?r1=1.116&r2=1.117)
pgsql/src/backend/postmaster:
pgstat.c (r1.172 -> r1.173)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/pgstat.c?r1=1.172&r2=1.173)
pgsql/src/include:
pgstat.h (r1.73 -> r1.74)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/pgstat.h?r1=1.73&r2=1.74)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2008-04-03 16:27:32 pgsql: Teach ANALYZE to distinguish dead and in-doubt tuples, which it
Previous Message Magnus Hagander 2008-04-03 13:25:02 pgsql: Oops, add proper #ifdef for systems without support for syslog.