Phantom Command IDs

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: Phantom Command IDs
Date: 2006-09-28 10:37:04
Message-ID: 451BA5D0.8080509@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Here's a patch that implements the Phantom Command ID idea that has been
discussed.

I didn't do anything about the system columns. We need to before
applying the patch, because the HeapTupleHeaderGetCmin/max functions
don't work properly if called outside the inserting/deleting
transaction. In fact, SELECT cmin,cmax FROM foo will cause assertion
failures if there's rows with phantom cids in the table.

I used the last free bit in t_infomask. At first I thought it wouldn't
be necessary, because you could detect that a row has a phantom command
id if both xmin and xmax are part of the current top-level transaction
(TransactionIdIsCurrentTransactionId). But that doesn't work because we
don't consider aborted subtransactions as current. Using the infomask
bit seems more robust anyway.

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

Attachment Content-Type Size
phantomcid.diff text/x-patch 21.5 KB

Browse pgsql-patches by date

  From Date Subject
Next Message Strong, David 2006-09-28 14:51:36 Re: Faster StrNCpy
Previous Message tomas 2006-09-28 07:05:22 Re: Can i see server SQL commands ?