I have these users:
postgres | Create role, Create DB | {cloudsqlsuperuser}
proxyuser | Create role, Create DB | {cloudsqlsuperuser}
qa|Create role, Create DB | {cloudsqlsuperuser}
And these tables:
List of relations
Schema | Name | Type | Owner
--------+--------------------+-------+-----------
public | member_preferences | table | proxyuser
public | message_queue | table | proxyuser
public | pubsub_queue | table | proxyuser
I am currently logged in as a postgres user and would like to give qa user permissions to read and write from any of those tables and any tables created in that schema in the future.
I was trying to follow this.
However, when I run
GRANT SELECT ON ALL TABLES IN SCHEMA public TO qa;
It responds with:
ERROR: permission denied for relation message_queue
How do I troubleshoot this further? What am I missing?
PostgreSQL 9.6.1 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4, 64-bit
is the version the instance displays
UPDATE:
I had to login as the proxyuser that was generating the tables in the first place to be able to give the permissions to the other user to read and write. This is really uncomfortable because all the users have the cloudsqlsuperuser
role applied to them. As such, I expect the grant on the table to work from any of these users to any of them.
I encountered an issue which may be similar to yours which is now resolved by the method below:
Google appears to grant the first user all privileges but not subsequent users.. maybe?!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With