Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avlCj-00018I-Gz for pgsql-committers@arkaria.postgresql.org; Thu, 28 Apr 2016 12:38:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1avlCi-0006We-UY for pgsql-committers@arkaria.postgresql.org; Thu, 28 Apr 2016 12:38:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1avlCi-0006WR-Fr for pgsql-committers@postgresql.org; Thu, 28 Apr 2016 12:38:00 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1avlCe-0000I2-Pp for pgsql-committers@postgresql.org; Thu, 28 Apr 2016 12:37:59 +0000 Received: from bruce by momjian.us with local (Exim 4.84_2) (envelope-from ) id 1avlCc-0008Ak-1n; Thu, 28 Apr 2016 08:37:54 -0400 Date: Thu, 28 Apr 2016 08:37:54 -0400 From: Bruce Momjian To: Andres Freund Cc: Alvaro Herrera , pgsql-committers@postgresql.org Subject: Re: pgsql: pg_upgrade: preserve database and relation minmxid values Message-ID: <20160428123754.GE13281@momjian.us> References: <20160327154451.s35h3gggdnnadt2x@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160327154451.s35h3gggdnnadt2x@alap3.anarazel.de> User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org On Sun, Mar 27, 2016 at 05:44:51PM +0200, Andres Freund wrote: > Hi, > > On 2014-07-02 19:29:43 +0000, Bruce Momjian wrote: > > pg_upgrade: preserve database and relation minmxid values > > > > Also set these values for pre-9.3 old clusters that don't have values to > > preserve. > > > > Analysis by Alvaro > > > > Backpatch through 9.3 > > My compiler quite correctly complains about misleading indentation > introduced by this commit: > > /home/andres/src/postgresql-9.3/src/bin/pg_dump/pg_dump.c:2475:4: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation] > lo_res = ExecuteSqlQueryForSingleRow(fout, loFrozenQry->data); > ^~~~~~ > /home/andres/src/postgresql-9.3/src/bin/pg_dump/pg_dump.c:2469:3: note: ...this 'else' clause, but it is not > else > ^~~~ > > The code in question is: > /* > * pg_largeobject_metadata > */ > if (fout->remoteVersion >= 90000) > { > resetPQExpBuffer(loFrozenQry); > resetPQExpBuffer(loOutQry); > > if (fout->remoteVersion >= 90300) > appendPQExpBuffer(loFrozenQry, "SELECT relfrozenxid, relminmxid\n" > "FROM pg_catalog.pg_class\n" > "WHERE oid = %u;\n", > LargeObjectMetadataRelationId); > else > appendPQExpBuffer(loFrozenQry, "SELECT relfrozenxid, 0 AS relminmxid\n" > "FROM pg_catalog.pg_class\n" > "WHERE oid = %u;\n", > LargeObjectMetadataRelationId); > > lo_res = ExecuteSqlQueryForSingleRow(fout, loFrozenQry->data); > > This appears to have been the result of a somewhat incorrectly resolved > conflict in 9.3/9.4 (master/9.5 don't show the problem). Thanks, indentation fixed. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription + -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers