PostgreSQL: Unable to drop the public schema

174 views
Skip to first unread message

Feike Steenbergen

unread,
Mar 16, 2017, 11:41:00 AM3/16/17
to Google Cloud SQL discuss
To be able to fully administer my database I want to drop the public schema.
By default every user has privileges to create objects in this schema.

I want to be able to create roles that are unable to create any object, therefore I need to be able to control the public schema as well.

Suggestion: On the template1 database of new instances, ensure the public schema is owned by postgres instead of cloudsqladmin. This allows me to drop the schema if needed.

paynen

unread,
Mar 16, 2017, 6:54:48 PM3/16/17
to Google Cloud SQL discuss
Hey Feike,

This seems like an excellent Feature Request to make in the Public Issue Tracker. I tested and confirmed the public schema is owned by cloudsqladmin, and of course that account has a randomly generated, unique instance-specific password and used only by the infrastructure to install updates. We monitor the Public Issue Tracker regularly and you should see a quick result if you clearly explain the nature of the issue.

Now, I'm not an expert in Postgres but you might consider looking into whether it's possible to put users into a group / role that doesn't have access to the schema?

At any rate, feel free to reply here if you have any additional comments or questions.

Cheers,

Nick
Cloud Platform Community Support
Reply all
Reply to author
Forward
0 new messages