Re: HOT documentation README - Mailing list pgsql-patches

From Pavan Deolasee
Subject Re: HOT documentation README
Date
Msg-id 2e78013d0709130030u4242fc58s106a7f0ba82689f8@mail.gmail.com
Whole thread Raw
In response to Re: HOT documentation README  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
List pgsql-patches


On 9/12/07, Pavan Deolasee <pavan.deolasee@gmail.com> 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

pgsql-patches by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: [COMMITTERS] pgsql: Remove QueryOperand->istrue flag, it was used only in cover
Next
From: Tom Lane
Date:
Subject: Re: HOT patch - version 15