From: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
---|---|
To: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Bogus assertion in multixact.c? |
Date: | 2005-05-03 18:43:39 |
Message-ID: | 20050503184339.GD12359@dcc.uchile.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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 (<alvherre[(at)]dcc(dot)uchile(dot)cl>)
"No hay cielo posible sin hundir nuestras raíces
en la profundidad de la tierra" (Malucha Pinto)
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2005-05-03 18:43:41 | Re: [pgsql-advocacy] Increased company involvement |
Previous Message | Marc G. Fournier | 2005-05-03 18:40:50 | Re: [pgsql-advocacy] Increased company involvement |