On 10/07/2015 05:12 AM, Andrus wrote:
> Hi!
>
>> The objects can't be owned by nothing, so you will need to reassign
>> ownership:
>> REASSIGN OWNED BY old_role TO new_role;
>> e.g.
>> REASSIGN OWNED BY vantaa TO postgres;
>> Then you can drop the role.
>
> User who deletes other users is not superuser. It is created using
>
> CREATE ROLE admin LOGIN
> NOSUPERUSER INHERIT CREATEDB CREATEROLE NOREPLICATION CONNECTION LIMIT
> 100;
> GRANT idd_owner TO admin;
>
>
> I tried
So to be clear admin is doing the below, correct?
>
> REASSIGN OWNED BY vantaa TO postgres;
>
> and
>
> REASSIGN OWNED BY vantaa TO idd_owner;
>
> but got error
>
> permission denied to reassign objects .
Is the above a blanket error or does it mention specific objects?
>
> How to fix ?
What you are trying to do is reverse what you did to get the present
setup. Do you have a record/script that shows what you did to create the
role and assign it to the objects?
>
> I can add some rights to user who invokes this command if this helps.
>
> Andrus.
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com