Unix Technical Forum

Phantom Command IDs

This is a discussion on Phantom Command IDs within the Pgsql Patches forums, part of the PostgreSQL category; --> Here's a patch that implements the Phantom Command ID idea that has been discussed. I didn't do anything about ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 10:02 AM
Heikki Linnakangas
 
Posts: n/a
Default Phantom Command IDs

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



---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:30 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com