Re: HOT WIP Patch - version 1 - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: HOT WIP Patch - version 1
Date
Msg-id 1171955991.25938.545.camel@silverbirch.site
Whole thread Raw
In response to Re: HOT WIP Patch - version 1  (Heikki Linnakangas <heikki@enterprisedb.com>)
List pgsql-hackers
On Thu, 2007-02-15 at 10:49 +0000, Heikki Linnakangas wrote:

> Do we actually ever want to remove dead tuples from the middle of the 
> chain? If a tuple in the middle of the chain is dead, surely every tuple 
> before it in the chain is dead as well, and we want to remove them as 
> well. I'm thinking, removing tuples from the middle of the chain can be 
> problematic, because we'd need to fiddle with the xmin/xmax of the other 
> tuples to make them match. Or change the tuple-following logic to not do 
> the xmin=xmax check, but it's a nice robustness feature.

I think the phrase "middle of the chain" is being used in two ways here.

If a tuple in the chain is dead, then all prior tuples are dead also.
That gives us a live portion of the chain and a dead portion of the
chain.

We will only ever need to follow the chain along the live portion, so
breaking the live portion of the chain is not allowable. Breaking the
chain in the dead portion *is* allowable and that is what is being
proposed here. We break the chain rather than simply remove all of it
because there may still be index pointers to some of the dead rows. 

Pavan's code does this now.

--  Simon Riggs              EnterpriseDB   http://www.enterprisedb.com




pgsql-hackers by date:

Previous
From: "Simon Riggs"
Date:
Subject: Re: HOT WIP Patch - version 1
Next
From: Tom Lane
Date:
Subject: Re: ToDo: add documentation for operator IS OF