Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tcQKd-00HZUo-H4 for pgsql-bugs@arkaria.postgresql.org; Mon, 27 Jan 2025 14:43:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tcQKc-00Ctnv-D0 for pgsql-bugs@arkaria.postgresql.org; Mon, 27 Jan 2025 14:43:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tcQKc-00Ctnm-4w for pgsql-bugs@lists.postgresql.org; Mon, 27 Jan 2025 14:43:18 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tcQKZ-001nd0-1D for pgsql-bugs@postgresql.org; Mon, 27 Jan 2025 14:43:17 +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 50REhDCJ391920; Mon, 27 Jan 2025 09:43:13 -0500 From: Tom Lane To: Alexander Kukushkin cc: Kirill Reshke , pgsql-bugs@postgresql.org Subject: Re: Superuser can't revoke role granted by non-superuser In-reply-to: References: Comments: In-reply-to Alexander Kukushkin message dated "Mon, 27 Jan 2025 11:13:47 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <391918.1737988993.1@sss.pgh.pa.us> Date: Mon, 27 Jan 2025 09:43:13 -0500 Message-ID: <391919.1737988993@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alexander Kukushkin writes: > E.g. superuser is supposed to use "revoke bb from aa granted by b" Exactly. This is not a bug, you just did not correctly name the privilege you're trying to revoke. If memory serves, the default behavior for a superuser is that we'll revoke the privilege as granted by the object owner, since that's the most common case. For everyone else, the default assumption about "granted by" is "yourself". Some edge cases about this might have changed in v16, not sure. regards, tom lane