Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n1sSI-0003xf-0c for pgsql-bugs@arkaria.postgresql.org; Mon, 27 Dec 2021 16:02:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n1sSG-0007Yk-RD for pgsql-bugs@arkaria.postgresql.org; Mon, 27 Dec 2021 16:02:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n1sSG-0007Yb-It for pgsql-bugs@lists.postgresql.org; Mon, 27 Dec 2021 16:02:32 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n1sSE-0001UH-Gb for pgsql-bugs@lists.postgresql.org; Mon, 27 Dec 2021 16:02:32 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 1BRG2RK61489049; Mon, 27 Dec 2021 11:02:27 -0500 From: Tom Lane To: andrewbille@gmail.com cc: pgsql-bugs@lists.postgresql.org, Daniel Gustafsson Subject: Re: BUG #17346: pg_upgrade fails with role granted by other role In-reply-to: <17346-f72b28bd1a341060@postgresql.org> References: <17346-f72b28bd1a341060@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Mon, 27 Dec 2021 08:38:17 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1489047.1640620947.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 27 Dec 2021 11:02:27 -0500 Message-ID: <1489048.1640620947@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > After the commit: > commit 371087d006e04991080bf17cf2287db38d3ea92e > Author: Daniel Gustafsson > Date: Fri Nov 26 14:02:01 2021 +0100 > Fix GRANTED BY support in REVOKE ROLE statements = > pg_upgrade for example from 10.19 version causes the error: Yeah, you don't even need pg_upgrade. Just do regression=3D# CREATE ROLE user1; CREATE ROLE user2; GRANT user1 TO user2 = GRANTED BY user1; CREATE ROLE CREATE ROLE ERROR: grantor must be current user A superuser, or really anyone who's a member of the user1 role, ought to be able to do that (especially since it used to be allowed). So it seems the permissions check was coded incorrectly. regards, tom lane