Re: HeapTupleHeaderAdvanceLatestRemovedXid doing the wrong thing with multixacts - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: HeapTupleHeaderAdvanceLatestRemovedXid doing the wrong thing with multixacts
Date
Msg-id CA+U5nMKFJTKybNo+LJ+1HdpHmpzubja_vfzWUGFf9AQE=DBmTg@mail.gmail.com
Whole thread Raw
In response to Re: HeapTupleHeaderAdvanceLatestRemovedXid doing the wrong thing with multixacts  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Oct 17, 2011 at 8:03 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
>> I just noticed that HeapTupleHeaderAdvanceLatestRemovedXid is comparing Xmax as a TransactionId without verifying
whetherit is a multixact or not.  Since they advance separately, this could lead to bogus answers.  This probably needs
tobe fixed.  I didn't look into past releases to see if there's a live released bug here or not. 
>
>> I think the fix is simply to ignore the Xmax if the HEAP_XMAX_IS_MULTI bit is set.
>
>> Additionally I think it should check HEAP_XMAX_INVALID before reading the Xmax at all.
>
> If it's failing to even check XMAX_INVALID, surely it's completely
> broken?  Perhaps it assumes its caller has checked all this?

Looking at it now.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: HeapTupleHeaderAdvanceLatestRemovedXid doing the wrong thing with multixacts
Next
From: Simon Riggs
Date:
Subject: Re: HeapTupleHeaderAdvanceLatestRemovedXid doing the wrong thing with multixacts