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 1n5AzZ-00063Z-Qf for pgsql-general@arkaria.postgresql.org; Wed, 05 Jan 2022 18:26:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n5AzX-0002Jc-Iy for pgsql-general@arkaria.postgresql.org; Wed, 05 Jan 2022 18:26:31 +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 1n5AzX-0002JT-8C for pgsql-general@lists.postgresql.org; Wed, 05 Jan 2022 18:26:31 +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 1n5AzU-0003LH-H5 for pgsql-general@lists.postgresql.org; Wed, 05 Jan 2022 18:26:30 +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 205IQPbn792112; Wed, 5 Jan 2022 13:26:26 -0500 From: Tom Lane To: Dominique Devienne cc: pgsql-general@lists.postgresql.org Subject: Re: Trouble DROP'ing a ROLE, despite REVOKE'ing its privileges In-reply-to: References: Comments: In-reply-to Dominique Devienne message dated "Wed, 05 Jan 2022 19:05:33 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <792110.1641407185.1@sss.pgh.pa.us> Date: Wed, 05 Jan 2022 13:26:25 -0500 Message-ID: <792111.1641407185@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Dominique Devienne writes: > Final step is to DROP the "owner" ROLE itself, but before doing that, > I run REVOKE ALL ON DATABASE "ddevienne" FROM "owner". That will only revoke privileges that were granted by the role doing the REVOKE, so I surmise that you did this as some other role. But actually capturing the DB's privileges at the point where the DROP ROLE is failing would help you debug. regards, tom lane