Re: MultiXactId error after upgrade to 9.3.4

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, 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-04-23 18:28:04
Message-ID: 20140423182804.GA21458@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 23, 2014 at 03:01:02PM -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.
>
> I think what we should do here is that if we see that XMAX_INVALID is
> set, we just reset everything to zero without checking the multixact
> contents. Something like the attached (warning: hand-edited, line
> numbers might be bogus)
>
> I still don't know under what circumstances this situation could arise.
> This seems most strange to me. I would wonder about this to be just
> papering over a different bug elsewhere, except that we know this tuple
> comes from a pg_upgraded table and so I think the only real solution is
> to cope.

Shouldn't we log something at least if we are unsure of the cause?

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2014-04-23 18:42:14 Re: MultiXactId error after upgrade to 9.3.4
Previous Message Alvaro Herrera 2014-04-23 18:01:02 Re: MultiXactId error after upgrade to 9.3.4