From: Andres Freund <andres@anarazel.de>
To: Bruce Momjian <bruce@momjian.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-committers@postgresql.org
Subject: Re: pgsql: pg_upgrade: preserve database and relation minmxid values
Date: Sun, 27 Mar 2016 17:44:51 +0200
Message-ID: <20160327154451.s35h3gggdnnadt2x@alap3.anarazel.de> (raw)
In-Reply-To: <E1X2QDv-00026R-3V@gemulon.postgresql.org>
References: <E1X2QDv-00026R-3V@gemulon.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
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).
Regards,
Andres
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: andres@anarazel.de, bruce@momjian.us, alvherre@2ndquadrant.com
Subject: Re: pgsql: pg_upgrade: preserve database and relation minmxid values
In-Reply-To: <20160327154451.s35h3gggdnnadt2x@alap3.anarazel.de>
References: <E1X2QDv-00026R-3V@gemulon.postgresql.org> <20160327154451.s35h3gggdnnadt2x@alap3.anarazel.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox