Re: DROP ROLE as SUPERUSER

From: Dominique Devienne <ddevienne(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: DROP ROLE as SUPERUSER
Date: 2025-04-29 14:50:40
Message-ID: CAFCRh-_2CiGRWxJ7q7ScW+L5xW9NKzTv_DFs9tsBQVJLFFPqJA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Feb 21, 2025 at 3:44 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Dominique Devienne <ddevienne(at)gmail(dot)com> writes:
> > On Fri, Feb 21, 2025 at 3:33 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> 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

Hi. Resurrecting this older thread, as I'm running into an issue with this.

> DROP OWNED also removes relevant permission entries (which can be
> thought of as things owned by the role, if you hold your head at
> the right angle). See its man page.

Except when it doesn't... I'm doing the DROP OWNED, and I'm getting
several "WARNING: no privileges could be revoked for ..." for SCHEMAs
and ROUTINEs. (which BTW break my unit tests, which monitor outputs).

So the "removes relevant permission entries" part is kinda broken IMHO.
Or at least, not at all as convenient as one might hope it to be. FWIW. --DD

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2025-04-29 14:51:58 Re: Upsert error "column reference is ambiguous"
Previous Message David Rowley 2025-04-29 12:43:17 Re: Upsert error "column reference is ambiguous"