RE: need help

From: Ashok kumar Mani <amani(at)accelaero(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>, "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: RE: need help
Date: 2020-04-22 14:53:21
Message-ID: VI1P191MB0719B39B2BF044EE3100A881AED20@VI1P191MB0719.EURP191.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Classification: External

Dear David,

I fixed the issue as below which worked for me . thanks for your quick help

test=# DROP OWNED BY amosserver_test;
DROP OWNED
test=# DROP OWNED BY amosuser_test;
DROP OWNED
test=# drop role amosserver_test;
DROP ROLE
test=# drop role amosuser_test;
DROP ROLE
test=#

From: David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
Sent: Wednesday, April 22, 2020 6:51 PM
To: Ashok kumar Mani <amani(at)accelaero(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org; pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: need help

Information Security Email Alert: This email is from an EXTERNAL source. Please use caution when clicking on links or opening attachments from an unknown or suspicious sender. To report a suspected phishing email, Send us an Email on Servicedesk(at)accelaero(dot)com<mailto:Servicedesk(at)accelaero(dot)com>

On Wed, Apr 22, 2020 at 7:45 AM Ashok kumar Mani <amani(at)accelaero(dot)com<mailto:amani(at)accelaero(dot)com>> wrote:

Classification: Internal

Dear All

Could you please some one help on this below issue ? I could n;t able to find any meaning on this below?

test=# drop user amosuser_test;
ERROR: role "amosuser_test" cannot be dropped because some objects depend on it
DETAIL: privileges for database test
test=#

From the documentation...

https://www.postgresql.org/docs/12/sql-droprole.html<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.postgresql.org%2Fdocs%2F12%2Fsql-droprole.html&data=02%7C01%7Camani%40accelaero.com%7Cced5d74b059b408739f608d7e6cc9bd7%7C7bbb8a4d7f1b4a589b3ac250fb8023e3%7C0%7C0%7C637231638780289768&sdata=HjpmGhyXoHqn%2BD2YS%2Fq4tcvyeUVAoHyyY7%2FK7qNCYPw%3D&reserved=0>

""""
A role cannot be removed if it is still referenced in any database of the cluster; an error will be raised if so. Before dropping the role, you must drop all the objects it owns (or reassign their ownership) and revoke any privileges the role has been granted on other objects. The REASSIGN OWNED and DROP OWNED commands can be useful for this purpose; see Section 21.4 for more discussion.
""""
David J.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Yannick Collette 2020-04-22 18:09:21 Re: checkpoint starting: time (insert statement hangs
Previous Message David G. Johnston 2020-04-22 14:50:55 Re: need help