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 1luJOs-0007kM-HH for pgsql-bugs@arkaria.postgresql.org; Fri, 18 Jun 2021 18:39:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1luJOr-0004TQ-IN for pgsql-bugs@arkaria.postgresql.org; Fri, 18 Jun 2021 18:39:29 +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 1luJOr-0004TI-Bf for pgsql-bugs@lists.postgresql.org; Fri, 18 Jun 2021 18:39:29 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1luJOp-0000yP-7l for pgsql-bugs@lists.postgresql.org; Fri, 18 Jun 2021 18:39:28 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id EC0375C017E; Fri, 18 Jun 2021 14:39:25 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 18 Jun 2021 14:39:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=kU0zQJHUmhXcag11CZ2Y6vzZ5uuM0vvFJzB4a/zE8vQ=; b=ZSMdhIXa l4texk/AkuSbIDkI9ugyhIkZTtbECrtDvACEcUEhAuvvJxf4R/qt+V54hUNM9bfr yOLy077BXtFVmJLIGZDtkxp+XX4kq301/EFzr9eAfc7n+oiEXy+2WQSeAutEkmvo ppO53vHqwocAe9VP6ou0QpTQIBUuMR4tTVcQh4gP9OBe16it3zn9EWfUZRW92VwA ZUoW8doIOjG2cnPMwdPBvKl7hV1RFjJfVdrgBB3vrnZS133b5LPlMWQtU7a34zV8 GC1ExoAqlSItXZq7J9+IUb9bLIlRl+qjVzwILk/1A/z9ktjfs2wCH4Ren5eVsQgY GbDx2JJan5GM0g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeeffedguddvfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepledvgfffvedvieeukeekjedvtdefteeuieejtedtgfeh leefieefueetleduveeunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 18 Jun 2021 14:39:25 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 373872A0ADA; Fri, 18 Jun 2021 14:39:22 -0400 (-04) Date: Fri, 18 Jun 2021 14:39:22 -0400 From: Alvaro Herrera To: Tom Lane Cc: Stephen Frost , Michael Paquier , exclusion@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17062: Assert failed in RemoveRoleFromObjectPolicy() on DROP OWNED policy applied to duplicate role Message-ID: <202106181839.koswu7e5tn6j@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1233946.1624041420@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Jun-18, Tom Lane wrote: > Stephen Frost writes: > > I haven’t had a chance to delve into this but as far as the question above > > goes- short answer is yes, there was generally an idea that we don’t want > > policies just disappearing. Also- we don’t allow a role to be dropped when > > there are GRANT’d privileges, users have to go REVOKE any privileges that > > reference the role. > > But shouldn't DROP OWNED BY clean those out for you? If you've got > the right to get rid of the role, ISTM that that should certainly > include the right to get rid of grants to it. Yeah, that's the intention of DROP OWNED BY. -- Álvaro Herrera 39°49'30"S 73°17'W "Crear es tan difícil como ser libre" (Elsa Triolet)