On Tue, May 03, 2005 at 09:33:30PM +0300, Heikki Linnakangas wrote:
> There's an assertion in multixact.c, MultiXactIdExpand function, line 273:
> 
>        Assert(!TransactionIdEquals(multi, xid));
> 
> where multi is a MultiXactId and xid is a TransactionId.
> 
> Isn't this bogus? If I understand the code correctly, multixactids and 
> regular xids live in completely separate id spaces. Therefore a comparison 
> between them makes no sense.

Well :-)  actually that particular MultiXactId may be a TransactionId.
(See the isMulti param, and comments at the beggining of the function.)
This ugliness is there to support the notion of locking a tuple with
either a TransactionId (non-contention case) or a MultiXactId
(concurrent case.)

We require MultiXactId to be equivalent to TransactionId anyway, because
we store Multis on a tuple's Xmax.

Congratulations for spotting that :-)  (Are you using a source checker
tool?)

-- 
Alvaro Herrera (<[EMAIL PROTECTED]>)
"No hay cielo posible sin hundir nuestras raíces
 en la profundidad de la tierra"                        (Malucha Pinto)

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to