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 1tlUYA-00CQsN-QP for pgsql-general@arkaria.postgresql.org; Fri, 21 Feb 2025 15:02:46 +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 1tlUY9-00BDcQ-7d for pgsql-general@arkaria.postgresql.org; Fri, 21 Feb 2025 15:02:45 +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 1tlUY8-00BDcI-R1 for pgsql-general@lists.postgresql.org; Fri, 21 Feb 2025 15:02:45 +0000 Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tlUY6-002AbN-2Q for pgsql-general@lists.postgresql.org; Fri, 21 Feb 2025 15:02:44 +0000 Received: by mail-oi1-x22a.google.com with SMTP id 5614622812f47-3f410c67037so1176948b6e.0 for ; Fri, 21 Feb 2025 07:02:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740150161; x=1740754961; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=aVW82NLuZoD1ijszfN+lOoN7oG/Sn/bM62Q4dqXEy1w=; b=npeC34foK1cbU06Gxt+hTYNX4n9LcI4EzLFXNThEg4n7WlfXQwrdplRIWt1QIpKv3C XRM6Jb22f5fz8ytFfVMs/y1Ho68Aq1TFL/aYUcPfSZFVCAw4oMhxjWezsE3LGOtERvGz hUv7ClQ3d5uCWlJlIf5CAzpQQtCdB85n+9blohCqNk7kAgdOAShpnNDI6kWahZP1weUl AmbhjwUzebYKHYq6dbMMsILh3TnKMhwqYc3tZ4AvdwmHzE86rXMIBsGRZ1x+C8tLHyqM Y6BYzkb4lLv9halqBEJLXMsAHCgmoWg+O3XbBFvn7E3Rm+CjhqIX8hc4wkDaikn6qexx 7ZpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740150161; x=1740754961; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=aVW82NLuZoD1ijszfN+lOoN7oG/Sn/bM62Q4dqXEy1w=; b=BKepL/N14VaIqgKG84OHcmSEdAIYtcWHoG7YpaTmk/2QhK32Wfy01MJk2otbiUSxNb jLwijSeYbtLwtzYZuw8AfG/abc+hqYNITsWUuQuwqG13O1R/vCv4yWQcTjH4aetVIHvX WK5Yn+R4CssgryrRiEgxFG1TuSY2QmKiwBtYQOX44Sn2Y6NsS9W9U6Cgy42t6WVuizIr oTRIOhD+Zzqy6wjTrbLxkwnG4r8/g/qoCkC2jKPThYRv5+ZJoWJ4gOhse8I86o2vl5hF UuoA+o/kdclpnM9XlBUJgjpteBeilwwQNFcS2KGtGbHUS3+XWEsOMTP1FEX95wSqPJ9D XtNA== X-Forwarded-Encrypted: i=1; AJvYcCVAb+cm6BkQrzCMyvG8UYjEu0vmQTDNz7afTthT8Sp/zSUbMSvETZViRL9JKuFNrcBcXGHmi0nqwcHnZ72i@lists.postgresql.org X-Gm-Message-State: AOJu0YwnZkMDfF9hIGzTiAKbQWAb+D8MYsHuZg79bvX31FnGd1T+qY6A s5BUtIigEJpdaLtyFwU7mgiLwN33JJllCLZabLKQXQ2d8xzZnoTasry9+eJHRtJ9GAvJlCda+6h gBxm3dQ6LynBbtRNRrDPeQVZLYuY= X-Gm-Gg: ASbGncuobgxlxFquX5tQ/gweeT1/ASkGAGVbABflTe0hLWHThD5JvADBTsyu8ao9R47 i4cyktM8ZRWOqCPWOS+z5kfxGGTKgIQnCQLNVCekoxourNP17fEtJceAJSa8h/XqB5PU3C3pP0r dOXMkWrFAaig== X-Google-Smtp-Source: AGHT+IE4zgig6D2SVjgm/YQrSeAFbtOBei9mY+1nc5dhqU6Gjl7xskjbCrp20CwKrLkStafel1tTZJ/Ti6Y+OeTfIaE= X-Received: by 2002:a05:6808:3386:b0:3f3:b588:5a69 with SMTP id 5614622812f47-3f419ef57eemr5719933b6e.5.1740150161138; Fri, 21 Feb 2025 07:02:41 -0800 (PST) MIME-Version: 1.0 References: <2705563.1740067550@sss.pgh.pa.us> <2765124.1740070338@sss.pgh.pa.us> <3072990.1740148436@sss.pgh.pa.us> In-Reply-To: From: Dominique Devienne Date: Fri, 21 Feb 2025 16:02:24 +0100 X-Gm-Features: AWEUYZmyQu_68g-NhQsAPaw6BDFdIcsEJSZJ_V7mGoGBFy-4wWwnMiuzRiN-WGs Message-ID: Subject: Re: DROP ROLE as SUPERUSER To: "David G. Johnston" Cc: Tom Lane , "pgsql-general@lists.postgresql.org" Content-Type: multipart/alternative; boundary="00000000000035ef4f062ea8487d" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000035ef4f062ea8487d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Feb 21, 2025 at 3:45=E2=80=AFPM David G. Johnston < david.g.johnston@gmail.com> wrote: > On Friday, February 21, 2025, Dominique Devienne > wrote: > >> On Fri, Feb 21, 2025 at 3:33=E2=80=AFPM Tom Lane wro= te: >> >>> 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 wi= sh >>> > 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. > OK, thanks Tom and David. I was misled by the name indeed. --DD --00000000000035ef4f062ea8487d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Feb 21, 2025 at 3:45=E2=80=AFPM D= avid G. Johnston <david.g.= johnston@gmail.com> wrote:
On Friday, F= ebruary 21, 2025, Dominique Devienne <ddevienne@gmail.com> wrote:
On Fr= i, Feb 21, 2025 at 3:33=E2=80=AFPM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Dominiq= ue Devienne <dd= evienne@gmail.com> 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.
OK, thanks Tom and David. I was misled by the name indeed. --DD= =C2=A0
--00000000000035ef4f062ea8487d--