From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <bruce@momjian.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: David G Johnston <david.g.johnston@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #11090: Unclear error message in pg_upgrade
Date: Tue, 29 Jul 2014 22:33:17 -0400
Message-ID: <15100.1406687597@sss.pgh.pa.us> (raw)
In-Reply-To: <20140730020819.GF2791@momjian.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>
<20140730020819.GF2791@momjian.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Bruce Momjian <bruce@momjian.us> writes:
> What I think you actually can do is to run pg_upgrade with a user that
> is not the install user in either cluster, as long as the oids match. I
> am afraid any more specific message could technically be wrong in some
> rare cases.
I think you missed my point. I'm suggesting actually restricting what
pg_upgrade will accept, so that the error conditions become simpler to
understand.
Furthermore, if your description of the restrictions is accurate, then
restricting to "the user must be the bootstrap superuser in both clusters"
is actually not an extra restriction. You said:
> o only one user can be defined in the new cluster (most likely the
> install user)
If there is only one user in the new cluster, it *is* the bootstrap
superuser, because that user cannot be deleted.
> o the oids of the two users must be the same (likely the install user
> on the old cluster as well)
If the OIDs are the same, then the old-cluster user is also the bootstrap
superuser, because the bootstrap superuser's hard-wired OID is 10. QED.
So I think you should get rid of the existing error check and simplify it
to "user must be bootstrap superuser (ie, OID 10) in both clusters".
The existing approach adds only confusion, not flexibility.
> What I think you actually can do is to run pg_upgrade with a user that
> is not the install user in either cluster, as long as the oids match.
I don't think you actually can, and if you could, I frankly would not
trust the results.
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, bruce@momjian.us, alvherre@2ndquadrant.com, david.g.johnston@gmail.com
Subject: Re: BUG #11090: Unclear error message in pg_upgrade
In-Reply-To: <15100.1406687597@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> <20140730020819.GF2791@momjian.us> <15100.1406687597@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