Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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: phantomcid.diff
Description: text/x-patch (21.5 KB)

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group