Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XCF0A-0002sM-1q for pgsql-bugs@arkaria.postgresql.org; Tue, 29 Jul 2014 21:32:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XCF09-0008R8-DX for pgsql-bugs@arkaria.postgresql.org; Tue, 29 Jul 2014 21:32:05 +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 1XCF08-0008Ph-DL for pgsql-bugs@postgresql.org; Tue, 29 Jul 2014 21:32:04 +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 1XCF03-00068d-CQ for pgsql-bugs@postgresql.org; Tue, 29 Jul 2014 21:32:01 +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 s6TLVl7N008449; Tue, 29 Jul 2014 17:31:47 -0400 From: Tom Lane To: Alvaro Herrera , David G Johnston , Bruce Momjian cc: pgsql-bugs@postgresql.org Subject: Re: BUG #11090: Unclear error message in pg_upgrade 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> Comments: In-reply-to David G Johnston message dated "Tue, 29 Jul 2014 13:40:45 -0700" Date: Tue, 29 Jul 2014 17:31:47 -0400 Message-ID: <8448.1406669507@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 David G Johnston 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