"Gurjeet Singh" <singh.gurjeet@gmail.com> writes:
> is the following condition always supposed to be true?
> CurrentResourceOwner==CurrentTransactionState->curTransactionOwner
No.
> If not, then we should remember the CurrentResourceOwner
> across BIST() and RARCST() calls!
As indeed the current callers of them do...
regards, tom lane