Skip site navigation (1) Skip section navigation (2)

Proposed patch for ANALYZE overcounting dead rows

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-patches(at)postgreSQL(dot)org
Subject: Proposed patch for ANALYZE overcounting dead rows
Date: 2007-11-16 22:58:23
Message-ID: 6363.1195253903@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
There's been a thread in pgsql-performance about ANALYZE reporting an
overly large number of dead rows because it counts anything that's not
visible-per-SnapshotNow-rules as "dead", in particular
insert-in-progress tuples are reported as "dead".  This seems a bad
idea because it may prompt autovacuum to launch a useless vacuum.

The attached patch revises ANALYZE to distinguish tuple states the same
way VACUUM does, and to not count INSERT_IN_PROGRESS nor
DELETE_IN_PROGRESS tuples as either "live" or "dead".

Comments?  In particular, should we report a count of in-doubt tuples in
the eventual LOG message, and does anyone want to argue for still
counting DELETE_IN_PROGRESS as "dead"?

			regards, tom lane

pgsql-patches by date

Next:From: Euler Taveira de OliveiraDate: 2007-11-17 19:53:53
Subject: wrong behavior using to_char() again
Previous:From: Alvaro HerreraDate: 2007-11-16 19:17:28
Subject: Re: pg_ctl -t N register ??

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group