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 1tlUHe-00COm1-AJ for pgsql-general@arkaria.postgresql.org; Fri, 21 Feb 2025 14:45:42 +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 1tlUHc-00Aq0E-1Z for pgsql-general@arkaria.postgresql.org; Fri, 21 Feb 2025 14:45:40 +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 1tlUHb-00ApxK-Mx for pgsql-general@lists.postgresql.org; Fri, 21 Feb 2025 14:45:39 +0000 Received: from mail-oi1-x232.google.com ([2607:f8b0:4864:20::232]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tlUHZ-002ARA-2B for pgsql-general@lists.postgresql.org; Fri, 21 Feb 2025 14:45:39 +0000 Received: by mail-oi1-x232.google.com with SMTP id 5614622812f47-3f42e108acfso68806b6e.0 for ; Fri, 21 Feb 2025 06:45:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740149135; x=1740753935; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=aAfx1IdY/d2n9zbr0NgLWE7tNMjPVtS+cTNtjN0vZ64=; b=RyRfdmHxl/RFOj2vD/YzWWxr1iNRQ/iHrgLQ7Zz+Eiqz19vqRT9aOExJgorQknSrAl TupMOu97edsSePF63ggTj8guoTf43Img3vXJAFLnw/lDbazXImJF8j3QT3lGhAYElv4a WbgrYX2kLZ4WSh/3l0ict1/GR+CYs2jg8iQ6GFtmTOHAXpmlcyfpprhf6ZwaivnJ4UF5 t8FB9rUMRbynRGTDgFbIWSvywe4z9o1dmNeo8eypnjPo5jCw583oFm6OokqHQtzcRcbt HYepjfQWwXYf1zuuhGwxSSUDVHB8GRjuW5mIZS8ZSLUiJ1TMf+zlx8cIEi3M9VtjdZGw dBtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740149135; x=1740753935; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=aAfx1IdY/d2n9zbr0NgLWE7tNMjPVtS+cTNtjN0vZ64=; b=qNr3I8Piyijg3iDYA1u34LImdyf2TN6CkeOmrMVPff1ORyEOLTs8A/Fh4i2Ni+rwBo 64eU+j3HZyLY+zsKFCgMr5hw08FgHT81iLsOe0hWWRYfD5M+H37K+a+WLMNn/abiukA2 wQ5GZcy4zD5mAMte9qcz0wQdlIxJGtlULhTnpPAfDAg434OFlY5wy1l63AWIwuSeT08A 1MM7fUP7xCfO5p0ylnDlGOF2oyWi8VW0ojvOcCmqIVvE3xNbytgeeVyE9L/2LLEHxw+o o9kRq4vFsCb7s2S98/psx/Yr0FIFi8UufnCBtR6TXLISCE+YCROUPIz/g/Cd9QHSBXjH qzKQ== X-Forwarded-Encrypted: i=1; AJvYcCVCcVMrtftOTgZEYrF7ABItveoxFo1ad0NrdEPKSXfDJcs5k1fsy2NcEh6EM+e9ZwE8NScHDkHr+7ja1gNE@lists.postgresql.org X-Gm-Message-State: AOJu0YwpUagKFwz8g77R7rUFN2KTk2Gv49iuaSYAprD5q3j3j+7A1aGj dK1WYkfnthEJeqKY6k5b7+XxvFQj9NjcGHM7PFq4ewxVH3tr8uZC5qgB4DpAswJxwWa1vL5ouMz onNzTzZV89mIZ7+Pf/AnWgZsn7kQ= X-Gm-Gg: ASbGnctlFsRK5lcuKp4A70mfZ9IkhCCET89mYgskEmXRgyM9P1ZRcoSMM+sOt+aVY+z JSzlrmkLAxvhjknkuE2V5qED8/i6e9Qb2MB1CteTzI9yok/dVOuAN/gDvrLOV2xccjOdhwN2Cap x+NTXtEg== X-Google-Smtp-Source: AGHT+IEQixQTx6rcsJ5IoUrnBPDmeW568CGMWnKWM1JcerDbCyUyE7w4TdzrXCQCIfAd3tF3E/O/4FeEqGNiyt1xMmQ= X-Received: by 2002:a05:6808:f03:b0:3f4:4c8:9453 with SMTP id 5614622812f47-3f4246c4319mr2716595b6e.16.1740149134880; Fri, 21 Feb 2025 06:45:34 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a05:6802:328f:b0:589:13f9:e937 with HTTP; Fri, 21 Feb 2025 06:45:32 -0800 (PST) In-Reply-To: References: <2705563.1740067550@sss.pgh.pa.us> <2765124.1740070338@sss.pgh.pa.us> <3072990.1740148436@sss.pgh.pa.us> From: "David G. Johnston" Date: Fri, 21 Feb 2025 07:45:32 -0700 X-Gm-Features: AWEUYZk5ge9wLy8Ehcm5dtn_uN1arerbf-AbTzHPHiYpLKqaWPc8jtICgq2dxwA Message-ID: Subject: Re: DROP ROLE as SUPERUSER To: Dominique Devienne Cc: Tom Lane , "pgsql-general@lists.postgresql.org" Content-Type: multipart/alternative; boundary="0000000000000a78dc062ea80b93" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000000a78dc062ea80b93 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Friday, February 21, 2025, Dominique Devienne wrote: > On Fri, Feb 21, 2025 at 3:33=E2=80=AFPM Tom Lane wrot= e: > >> Dominique Devienne writes: >> > The point I'm trying to make, is that "hunting down" grantor(s) to >> connect >> > to DB(s) to be able to "force drop" a ROLE is a PITA. And I really wis= h >> > there >> > was an easier way to drop a role in that situation. --DD >> >> REASSIGN OWNED then DROP OWNED is the recommended path. >> > > Hi. Am I missing something? foobar does not OWN anything in this case. > So I don't see how these recommendations are relevant to this particular > case. --DD > From =E2=80=9Cdrop owned=E2=80=9D: Any privileges granted to the given roles on objects in the current database or on shared objects (databases, tablespaces, configuration parameters) will also be revoked. So, the command does more than the name suggests. David J. --0000000000000a78dc062ea80b93 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Friday, February 21, 2025, Dominique Devienne <ddevienne@gmail.com> wrote:
On Fri, Feb 21, 2025 at 3:33= =E2=80=AFPM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Dominique Devienne <ddevienne@gmail.com&g= t; writes:
> The point I'm trying to make, is that "hunting down" gra= ntor(s) to connect
> to DB(s) to be able to "force drop" a ROLE is a PITA. And I = really wish
> there
> was an easier way to drop a role in that situation. --DD

REASSIGN OWNED then DROP OWNED is the recommended path.

Hi. Am I missing something? foobar does not OWN anything i= n this case.
So I don't see how these recommendations are rel= evant to this particular case. --DD

=
From =E2=80=9Cdrop owned=E2=80=9D:=C2=A0

=C2=A0Any privileges granted to the given roles on objects in the curr= ent database or on shared objects (databases, tablespaces, configuration pa= rameters) will also be revoked.

S= o, the command does more than the name suggests.

<= span style=3D"font-family:"Open Sans",sans-serif;font-size:14.4px= ">David J.

--0000000000000a78dc062ea80b93--