postgres-api icon indicating copy to clipboard operation
postgres-api copied to clipboard

Permissions error when using RDS

Open dcarley opened this issue 9 years ago • 4 comments

When using Amazon RDS PostgreSQL and binding an application to a service I get an error:

➜  flask-heroku-sample git:(master) tsuru service-bind flask-pg-dcarley -a flask-dcarley
Error: Failed to bind the instance "flask-pg-dcarley" to the app "flask-dcarley": must be member of role "flask_pg_d89d1e6"

The statement that causes this is:

ALTER DEFAULT PRIVILEGES FOR ROLE flask_pg_d89d1e6 GRANT ALL PRIVILEGES ON TABLES TO flask_pg_d_group

I have a feeling this is specific to RDS because the "admin" user doesn't have true superuser privileges, only rds_superuser. It works if I GRANT flask_pg_d89d1e6 TO pgadmin but that doesn't seem like the right programatic fix. Any suggestions?

dcarley avatar Apr 17 '15 13:04 dcarley

Is your shared admin user is the rds_superuser user ?

sroze avatar Apr 18 '15 15:04 sroze

Hi Samuel,

Yeah, it is.

dcarley avatar Apr 18 '15 18:04 dcarley

@dcarley did you fix it ? What was your solution for running that on RDS ?

sroze avatar Jul 28 '15 08:07 sroze

We didn't. The solution was to stop using RDS :wink:

I'd still be interested in trying to fix this, though.

dcarley avatar Jul 28 '15 09:07 dcarley