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
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.
---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at