Re:

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: AC Gomez <antklc(at)gmail(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re:
Date: 2021-11-22 22:35:13
Message-ID: 4103977.1637620513@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

AC Gomez <antklc(at)gmail(dot)com> writes:
> REASSIGN OWNED BY old_role TO masteruser;
> DROP OWNED BY old_role;
> DROP USER old_role;

> The consensus online is that these are the steps to be taken to
> successfully remove roles, yet we get this error below:
> ERROR: role "old_role" cannot be dropped because some objects depend on it
> DETAIL: privileges for database the_database 96 objects in database
> the_database SQL state: 2BP01

> What is it that we could be missing here?

You need to do the REASSIGN OWNED and DROP OWNED steps in each
database of the cluster that old_role has any objects/privileges in.

You might need a manual revoke on "the_database" too; I'm not sure
if DROP OWNED does anything about DB-level privileges.

regards, tom lane

In response to

  • at 2021-11-22 22:21:12 from AC Gomez

Browse pgsql-general by date

  From Date Subject
Next Message Shaozhong SHI 2021-11-23 02:14:19 Why swirling circles in pgAdmin?
Previous Message AC Gomez 2021-11-22 22:21:12