From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
Cc: | Stephen Frost <sfrost(at)snowman(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: MultiXactId error after upgrade to 9.3.4 |
Date: | 2014-03-31 14:25:20 |
Message-ID: | 20140331142520.GY9567@eldon.alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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.
>
> I think this rule is wrong. I think the rule ought to be something like
> "if the XMAX_INVALID bit is set, then reset whatever is there if there
> is something; if the bit is not set, proceed as today". Otherwise we
> risk reading garbage, which is what is happening in this case.
Andres asks on IM: How come there is garbage there in the first place?
I have to admit I have no idea.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2014-03-31 14:34:24 | Re: MultiXactId error after upgrade to 9.3.4 |
Previous Message | steve k | 2014-03-31 14:18:08 | Re: PQputCopyData dont signal error |