From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Vacuum/visibility is busted |
Date: | 2013-02-08 15:55:03 |
Message-ID: | 20130208155503.GC3980@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane escribió:
> Alvaro Herrera <alvherre(at)2ndquadrant(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas Kretschmer | 2013-02-08 15:57:12 | Re: Bug, Feature, or what else? |
Previous Message | Adrian Klaver | 2013-02-08 15:48:47 | Re: Bug, Feature, or what else? |