Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XCJhx-0000Q3-6i for pgsql-bugs@arkaria.postgresql.org; Wed, 30 Jul 2014 02:33:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XCJhw-000777-IZ for pgsql-bugs@arkaria.postgresql.org; Wed, 30 Jul 2014 02:33:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XCJhv-000770-KM for pgsql-bugs@postgresql.org; Wed, 30 Jul 2014 02:33:35 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XCJhp-0003UW-UA for pgsql-bugs@postgresql.org; Wed, 30 Jul 2014 02:33:32 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s6U2XHob015101; Tue, 29 Jul 2014 22:33:17 -0400 From: Tom Lane To: Bruce Momjian cc: Alvaro Herrera , David G Johnston , pgsql-bugs@postgresql.org Subject: Re: BUG #11090: Unclear error message in pg_upgrade 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> Comments: In-reply-to Bruce Momjian message dated "Tue, 29 Jul 2014 22:08:19 -0400" Date: Tue, 29 Jul 2014 22:33:17 -0400 Message-ID: <15100.1406687597@sss.pgh.pa.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 Bruce Momjian 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