Merlin Moncure <mmoncure(at)gmail(dot)com> writes:
> On Wed, Mar 30, 2011 at 2:35 PM, Merlin Moncure <mmoncure(at)gmail(dot)com> wrote:
>> btw I haven't forgotten your idea to move TransactionIdInProgress
>> Down. I think this is a good idea, and will experiment with it pre and
>> post cache.
The reason it's done in that order is to avoid race conditions. If you
change the order you will get wrong behavior if the other transaction
ends between the TransactionIdDidCommit and the TransactionIdInProgress
tests. I suppose you could recheck TransactionIdDidCommit a second
time, but that hardly seems likely to result in performance gains.
> Moving TransactionIdInProgress below TransactionIdDidCommit can help
> in once sense: TransactionIdDidCommit grabs the XidStatus but discards
> the knowledge if the transaction is known aborted.
Doesn't the single-entry cache help with that?
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: emanov||Date: 2011-04-02 19:47:12|
|Subject: PG 9.0.3. How to select rows from xml|
|Previous:||From: Tom Lane||Date: 2011-04-02 19:12:32|
|Subject: Re: 9.0.3 SIGFAULT on FreeBSD with dtrace |