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)