On 9/12/07, Pavan Deolasee <[EMAIL PROTECTED]> wrote: > > > One change that is worh mentioning > and discussing is that we don't follow HOT chains while fetching tuples > during > autoanalyze and autoanalyze would consider all such tuples as DEAD. > In the worst case when all the tuples in the table are reachable via > redirected line pointers, this would confuse autoanalyze since it would > consider all tuples in the table as DEAD.
This is all crap. I was under the impression that heap_release_fetch() would never fetch a HOT tuple directly, but thats not true. analyze fetches all tuples in the chosen block, so it would ultimately fetch the visible tuple. A tuple is counted DEAD only if its t_data is set to non-NULL. For redirected line pointer heap_release_fetch() will set t_data to NULL and hence these line pointers are (rightly) not counted as DEAD. This is the right thing to do because lazy vacuum can not remove redirected line pointers. I think we should change this to follow HOT chain in analyze. > > > We need not follow the chain, but we should check for redirect-dead line pointers and count them as dead rows. Thanks, Pavan -- Pavan Deolasee EnterpriseDB http://www.enterprisedb.com