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

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Teach ANALYZE to distinguish dead and in-doubt tuples, which it
Date
Msg-id 20080403162725.775497558E7@cvs.postgresql.org
Whole thread Raw
List 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)

pgsql-committers by date:

Previous
From: mha@postgresql.org (Magnus Hagander)
Date:
Subject: pgsql: Oops, add proper #ifdef for systems without support for syslog.
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Teach ANALYZE to distinguish dead and in-doubt tuples, which it