From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
To: David G Johnston <david.g.johnston@gmail.com>
To: Bruce Momjian <bruce@momjian.us>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #11090: Unclear error message in pg_upgrade
Date: Tue, 29 Jul 2014 17:31:47 -0400
Message-ID: <8448.1406669507@sss.pgh.pa.us> (raw)
In-Reply-To: <1406666444963-5813220.post@n5.nabble.com>
References: <20140729174023.16601.48893@wrigleys.postgresql.org>
<20140729185859.GT5475@eldon.alvh.no-ip.org>
<1406666444963-5813220.post@n5.nabble.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
David G Johnston <david.g.johnston@gmail.com> writes:
> Alvaro Herrera-9 wrote
>> To me, the bug is that we required both superusers to be named the same
>> in the first place.
> It seems a reasonable limitation for something the simply purports to
> "upgrade". The data should not be changed in the process.
Yeah, I wouldn't really expect pg_upgrade to deal with such a case.
For one thing, what if the new cluster's superuser name conflicts with
some non-superuser in the old cluster?
Having said that, I think the actual implementation restriction is not
that they have the same *name*, but that they have the same *OID*.
And the OID of the bootstrap superuser is always gonna be 10. As long
as the new cluster's bootstrap superuser name doesn't collide with
any other usernames in the old cluster, it could in principle be
different. The only difficulty is that pg_upgrade has but one -U
switch to specify both names ... and it's not exactly clear that it's
worth the complication to have two such switches.
I agree that it'd be better if the error message said something like
"you have to use the bootstrap superuser, which is 'foo' in this cluster".
That would be overconstraining the user of pg_upgrade, but not by much,
and it would be a lot easier to understand than the current situation.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, david.g.johnston@gmail.com, bruce@momjian.us
Subject: Re: BUG #11090: Unclear error message in pg_upgrade
In-Reply-To: <8448.1406669507@sss.pgh.pa.us>
References: <20140729174023.16601.48893@wrigleys.postgresql.org> <20140729185859.GT5475@eldon.alvh.no-ip.org> <1406666444963-5813220.post@n5.nabble.com> <8448.1406669507@sss.pgh.pa.us>
* 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