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

From Alvaro Herrera
Subject Re: Vacuum/visibility is busted
Date
Msg-id 20130208155503.GC3980@alvh.no-ip.org
Whole thread Raw
In response to Re: Vacuum/visibility is busted  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane escribió:
> 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)))

Ah, yes, by far.  Thanks, I pushed that way.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Considering Gerrit for CFs
Next
From: Tom Lane
Date:
Subject: Re: Considering Gerrit for CFs