On 25.03.2011 00:15, Stephen Frost wrote:
At the start of a load, we check if the table was created in the current transaction. If so, we check if we've already done a load which used the frozen XID. If we have, then we use the normal mechanics. If we havn't, then we stuff what the XID would have been in memory somewhere, mark that we've used the frozen XID, and load the data using the frozen XID. On subsequent queries, if we come across a frozen XID in a table created in this transaction, we use the XID we've stored instead of the frozen XID.
The tricky part here is how to check if the table was created in the same transaction, within HeapTupleSatisfiesMVCC, with minimal overhead. If you do it naively, the check will be executed at every single tuple read in the system. It has to be really really fast.
I don't want to discourage, maybe it's possible with some clever code arrangement. However, it needs a lot of performance testing.
-- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers