Re: Vacuum/visibility is busted - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Vacuum/visibility is busted
Date
Msg-id 28450.1360298849@sss.pgh.pa.us
Whole thread Raw
In response to Re: Vacuum/visibility is busted  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Vacuum/visibility is busted
List pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
>       xid = HeapTupleHeaderGetRawXmax(tuple);
> !     if (((tuple->t_infomask & HEAP_XMAX_IS_MULTI) &&
> !          MultiXactIdIsValid(xid) &&
> !          MultiXactIdPrecedes(xid, cutoff_multi)) ||
> !         ((!(tuple->t_infomask & HEAP_XMAX_IS_MULTI)) &&
> !          TransactionIdIsNormal(xid) &&
> !          TransactionIdPrecedes(xid, cutoff_xid)))
>       {

Would this be clearer as a ternary expression?  That is,
if ((tuple->t_infomask & HEAP_XMAX_IS_MULTI) ?    (MultiXactIdIsValid(xid) &&     MultiXactIdPrecedes(xid,
cutoff_multi)):    (TransactionIdIsNormal(xid) &&     TransactionIdPrecedes(xid, cutoff_xid)))
 
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Dunstan
Date:
Subject: Re: [JDBC] JPA + enum == Exception
Next
From: Tom Lane
Date:
Subject: Re: [JDBC] JPA + enum == Exception