Re: Pre-set Hint bits/VACUUM FREEZE on data load..? - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Pre-set Hint bits/VACUUM FREEZE on data load..?
Date
Msg-id 4D8C4DC6.1070900@enterprisedb.com
Whole thread Raw
In response to Re: Pre-set Hint bits/VACUUM FREEZE on data load..?  (Stephen Frost <sfrost@snowman.net>)
Responses Re: Pre-set Hint bits/VACUUM FREEZE on data load..?
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Daniel Farina
Date:
Subject: Re: Pre-set Hint bits/VACUUM FREEZE on data load..?
Next
From: Gianni Ciolli
Date:
Subject: Re: maximum digits for NUMERIC