Re: Completely replacing an old user

From: Koen De Groote <kdg(dot)dev(at)gmail(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Completely replacing an old user
Date: 2023-09-17 12:04:30
Message-ID: CAGbX52H=ej5q6yZSnfhjfLd84jvevgW8QVWYq+SM_kMyLQqmmQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Right, from reading the responses, it seems my previous efforts ignored the
privileges on schema, and I focused only on database and everything
dependent on the database object.

With altering default privileges on the schema, my issue is solved.

Thanks to all who contributed.

Regards,
Koen De Groote

On Sat, Sep 16, 2023 at 8:27 PM Koen De Groote <kdg(dot)dev(at)gmail(dot)com> wrote:

> All,
>
> I am trying to set up a new user for a client application, and thus want
> to remove the old user afterward.
>
> The steps are:
>
> 1/ create the new user
> 2/ give the new user all priviliges on database, table, sequence, function
> and procedures, just like the old user
> 3/ deply client application with the new user and credentials
> 3/ Swap ownership of the databases
> 4/ Remove privileges from the old user
> 5/ Drop the old user
>
> But I'm getting stuck on one last error message:
>
>
> ERROR: role "X" cannot be dropped because some objects depend on it
> DETAIL: privileges for default privileges on new functions belonging to
> role postgres in schema public
>
> The "new functions" bit is confusing. I've swapped over all the current
> functions, but cannot seem to find the appropriate table for privileges on
> new functions.
>
>
> What am I missing here?
>
> Regards,
> Koen De Groote
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message M Sarwar 2023-09-17 15:26:14 Unable to drop the user
Previous Message Pepe TD Vo 2023-09-16 22:46:13 Re: Completely replacing an old user