Re: Eror while dropping a user - Mailing list pgsql-general

From Tom Lane
Subject Re: Eror while dropping a user
Date
Msg-id 7210.1533334976@sss.pgh.pa.us
Whole thread Raw
In response to Eror while dropping a user  (Ertan Küçükoğlu <ertan.kucukoglu@1nar.com.tr>)
List pgsql-general
=?iso-8859-9?B?RXJ0YW4gS/zn/Gtv8Gx1?= <ertan.kucukoglu@1nar.com.tr> writes:
> Using PostgreSQL 9.6.9 on Linux amd64 platform.

> 2018-08-03 23:24:03.901    Drop user failed: SQL Error: ERROR:  role
> "pars.test" cannot be dropped because some objects depend on it
> AYRINTI:  1 object in database postgres

I see you've resolved your problem, but for future reference, note that
you could have gotten a more detailed error message if you'd issued the
DROP USER while connected to the postgres database.  When the command
is issued in database A, we can't see the details of what the user owns
in database B, only that there is something over there :-(

FWIW, I'm guessing that the issue was not object ownership per se,
but permissions granted on some object owned by someone else.  Those
have to be revoked as well before a DROP USER will succeed.

You might also care to read up on DROP OWNED BY.

            regards, tom lane


pgsql-general by date:

Previous
From: Ertan Küçükoğlu
Date:
Subject: RE: Eror while dropping a user
Next
From: Simon Riggs
Date:
Subject: Re: Pg_rewind cannot load history wal