HeapTupleSatisfies micro tuning - Mailing list pgsql-hackers

From Simon Riggs
Subject HeapTupleSatisfies micro tuning
Date
Msg-id 1202307885.29242.15.camel@ebony.site
Whole thread Raw
List pgsql-hackers
I note that in HeapTupleSatisfies... we call
TransactionIdIsCurrentTransactionId() explicitly and then call it again
in TransactionIdIsInProgress(). Which means we also end up checking
twice whether each xid is normal also. 

It would seem easier to make a check TransactionIdIsRecent() early and
if true then check TransactionIdIsCurrentTransactionId() and then check
RecentTransactionIdIsInProgress(). That would avoid the multiple checks,
as well as save a few cycles since the IsCurrent check can be expensive
if we have many subtransactions.

--  Simon Riggs 2ndQuadrant  http://www.2ndQuadrant.com 



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: PostgreSQL 8.4 development plan
Next
From: Staale Smedseng
Date:
Subject: Re: Why are we waiting?