Re: pg_upgrade < 9.3 -> >=9.3 misses a step around multixacts

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: pg_upgrade < 9.3 -> >=9.3 misses a step around multixacts
Date: 2014-07-22 22:34:49
Message-ID: 20140722223449.GD1563@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Jul 22, 2014 at 04:14:01PM +0200, Andres Freund wrote:
> On 2014-07-22 09:09:31 -0400, Bruce Momjian wrote:
> > On Sun, Jul 20, 2014 at 11:19:30PM -0400, Tom Lane wrote:
> > > I wrote:
> > > > Here's a draft patch for this. I think this will fix all cases where
> > > > the "1" minmxid inserted by previous pg_upgrade versions is actually
> > > > in the future at the time we run VACUUM. We would still be at risk if
> > > > it had been in the future when pg_upgrade ran but no longer is now,
> > > > since that would mean there could be non-lock-only mxids on disk that
> > > > are older than "1". However, for the reasons discussed upthread, it
> > > > seems fairly unlikely to me that people would actually get burnt in
> > > > practice, so I'm satisfied with doing this much and no more.
> > >
> > > Ah, belay that: as coded, that would allow truncation of clog/multixact
> > > as soon as any one relation in any one database had sane
> > > frozenxid/minmxid. If we want to have any pretense of being safe, we have
> > > to postpone truncation until *all* relations have been vacuumed. So more
> > > like the attached, instead.
> >
> > Should we conclude that the multi-xact code is hopelessly complex and
> > needs a redesign?
>
> That might be true, but I don't see the above as evidence of it. It's a
> nontrivial workaround for a bug; it's not surprising that it needs a
> couple iterations to make sense. Without the pg_upgrade bug there'd be
> no need to make those adjustments.

Well, my point is that even Tom was confused about how things should be
handled. Anyway, seems no one thinks a redesign is needed, but I had to
ask.

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

+ Everyone has their own god. +

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2014-07-23 00:12:39 Re: BUG #11021: How to extract text value from json scalar?
Previous Message Jeff Fischer 2014-07-22 20:50:43 Re: BUG #10972: string_agg function incorrectly concatenating varying delimiter