Re: CLUSTER and MVCC

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, nagy(at)ecircle-ag(dot)com
Subject: Re: CLUSTER and MVCC
Date: 2007-03-15 10:31:39
Message-ID: 45F9208B.2080906@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2007-03-15 10:36:11 Re: where to add/change commands
Previous Message Grzegorz Jaskiewicz 2007-03-15 10:23:34 where to add/change commands