Tuesday, April 21, 2020

[google-cloud-sql-discuss] Re: Cannot delete created role (Postgres 11)

Try these two then delete again.

REVOKE ALL PRIVILEGES ON DATABASE somebase from observer CASCADE;
REVOKE ALL PRIVILEGES ON SCHEMA public from observer CASCADE;

On Wednesday, April 8, 2020 at 10:11:21 PM UTC+10, Mikheev Aleksandr wrote:
I created user observer using postgres user on my PostgreSQL 11 instance and I don't need it anymore. But after all I can't delete it - pgAdmin showing me that my user have connect privileges granted by the cloudsqlsuperuser, and I cannot revoke it to delete my earlier created user account!

somebase=> REVOKE ALL PRIVILEGES ON DATABASE "somebase" FROM observer;
REVOKE
somebase
=> DROP ROLE observer;
ERROR
: role "observer" cannot be dropped because some objects depend on it DETAIL: privileges for database somebase
I also tried to delete it using gcloud cli and CloudSQL console both and failed. So how to delete it now?

Polybius Tech OÜ is a limited liability company registered in Estonia. Registered number: 14420450. Registered office: Tartu mnt. 43, Tallinn 10128, Estonia.


Any information sent by e-mail by Polybius Tech OÜ ("Polybius") or any of its affiliates is confidential and intended solely for the use of the individual or entity to whom it is addressed. If you are not the named addressee you should not disseminate, distribute or copy this email. If you have received this message in error please delete it and any copies of it and notify the sender immediately. Note that the contents of an attachment to this e-mail may contain software viruses, which could damage your computer system. While Polybius has taken every reasonable precaution to minimise this risk, we cannot accept liability for any damage which you sustain as a result of software viruses. You should carry out your own virus checks before opening the attachment.


--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/30e29bc8-b554-4582-a8cb-9d72d964eaca%40googlegroups.com.

No comments:

Post a Comment