Re: HeapTupleSatisfiesUpdate missing a bet? - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: HeapTupleSatisfiesUpdate missing a bet?
Date
Msg-id 20050326032039.GB7315@dcc.uchile.cl
Whole thread Raw
In response to Re: HeapTupleSatisfiesUpdate missing a bet?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Mar 25, 2005 at 06:46:58PM -0500, Tom Lane wrote:

> Also, you just introduced a race condition, since the transaction might
> have committed after the earlier tests and before you did
> TransactionIdIsInProgress.  You really have to do
> TransactionIdIsInProgress *first*, which makes the proposed change even
> more expensive.

Oh, right.  I knew there was a reason, I just couldn't remember it.

> What's wrong with using XactLockTableWait?  It's not going away --- the
> implementation might change but I can't see getting rid of the
> functionality.

Nothing wrong indeed, if you take this PoV.  That's exactly what I've
done now, since it is what heap_mark4update (which I'm replacing) does
at present.  (I use LockTuple(), a lock which is only released at
transaction end, so the net result is semantically equivalent to
XactLockTableWait -- that's why I want to get rid of it.)

-- 
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"El sentido de las cosas no viene de las cosas, sino de
las inteligencias que las aplican a sus problemas diarios
en busca del progreso." (Ernesto Hernández-Novich)


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: minor windows & cygwin regression failures on stable
Next
From: "Marc G. Fournier"
Date:
Subject: 8.0.2beta1 ... look her over ...