Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X9apT-0000DT-Rz for pgsql-bugs@arkaria.postgresql.org; Tue, 22 Jul 2014 14:14:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X9apT-0004sZ-Cc for pgsql-bugs@arkaria.postgresql.org; Tue, 22 Jul 2014 14:14:07 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X9apR-0004qS-UK for pgsql-bugs@postgresql.org; Tue, 22 Jul 2014 14:14:06 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X9apO-0001HS-9q for pgsql-bugs@postgresql.org; Tue, 22 Jul 2014 14:14:03 +0000 Received: from intern.anarazel.de (p5DDC5AD1.dip0.t-ipconnect.de [93.220.90.209]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id A8AFE500001; Tue, 22 Jul 2014 16:14:01 +0200 (CEST) Date: Tue, 22 Jul 2014 16:14:01 +0200 From: Andres Freund To: Bruce Momjian Cc: Tom Lane , Alvaro Herrera , PostgreSQL Bugs Subject: Re: pg_upgrade < 9.3 -> >=9.3 misses a step around multixacts Message-ID: <20140722141401.GC4190@alap3.anarazel.de> References: <17935.1405895946@sss.pgh.pa.us> <20140720225653.GG5974@alap3.anarazel.de> <18673.1405897470@sss.pgh.pa.us> <18851.1405897900@sss.pgh.pa.us> <20140720233125.GI5974@alap3.anarazel.de> <19458.1405899435@sss.pgh.pa.us> <20140720234925.GJ5974@alap3.anarazel.de> <22178.1405903964@sss.pgh.pa.us> <26504.1405912770@sss.pgh.pa.us> <20140722130931.GA1563@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140722130931.GA1563@momjian.us> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs