Re: MultiXactId error after upgrade to 9.3.4 - Mailing list pgsql-hackers

From Andres Freund
Subject Re: MultiXactId error after upgrade to 9.3.4
Date
Msg-id 20140331123030.GB18358@alap3.anarazel.de
Whole thread Raw
In response to Re: MultiXactId error after upgrade to 9.3.4  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: MultiXactId error after upgrade to 9.3.4  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On 2014-03-31 09:19:12 -0300, Alvaro Herrera wrote:
> Andres Freund wrote:
> > On 2014-03-31 08:54:53 -0300, Alvaro Herrera wrote:
> > > My conclusion here is that some part of the code is failing to examine
> > > XMAX_INVALID before looking at the value stored in xmax itself.  There
> > > ought to be a short-circuit.  Fortunately, this bug should be pretty
> > > harmless.
> > > 
> > > .. and after looking, I'm fairly sure the bug is in
> > > heap_tuple_needs_freeze.
> > 
> > heap_tuple_needs_freeze() isn't *allowed* to look at
> > XMAX_INVALID. Otherwise it could miss freezing something still visible
> > on a standby or after an eventual crash.
> 
> Ah, you're right.  It even says so on the comment at the top (no
> caffeine yet.)  But what it's doing is still buggy, per this report, so
> we need to do *something* ...

Are you sure needs_freeze() is the problem here?

IIRC it already does some checks for allow_old? Why is the check for
that not sufficient?

Greetings,

Andres Freund

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



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: MultiXactId error after upgrade to 9.3.4
Next
From: Michael Paquier
Date:
Subject: Re: New parameter RollbackError to control rollback behavior on error