Re: CLUSTER and MVCC - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: CLUSTER and MVCC
Date
Msg-id 45F9208B.2080906@enterprisedb.com
Whole thread Raw
In response to Re: CLUSTER and MVCC  (Heikki Linnakangas <heikki@enterprisedb.com>)
Responses Re: CLUSTER and MVCC  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Heikki Linnakangas wrote:
> One potential issue I'm seeing is that if we rely on the unbroken chain 
> starting from < OldestXmin, and that tuple isn't there because of a bug, 
> for example, the later version of the tuple is skipped and the row is lost.

After further thought, I don't feel comfortable with the idea because of  the above loss of robustness.

I'm thinking of keeping an in-memory mapping of old and new tids of 
updated tuples while clustering, instead. That means that cluster 
requires a little bit of memory for each RECENTLY_DEAD updated tuple. In 
the worst case that means that you run out of memory if there's too many 
of those in the table, but I doubt that's going to be a problem in practice.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Grzegorz Jaskiewicz
Date:
Subject: where to add/change commands
Next
From: Heikki Linnakangas
Date:
Subject: Re: where to add/change commands