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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |