PostgreSQL has brought the changes related to a public scheme.
PUBLIC
creation permission on the public
schema (Noah Misch)public
schema to be the new pg_database_owner
role (Noah Misch)The question is how to create a user using resource digitalocean_database_user to be belong to the new role?
I have tested on 16 and have not found such role.
luckyroot=> \du
List of roles
Role name | Attributes | Member of
---------------------+------------------------------------------------------------+-----------------------------------------------------------
_doadmin_managed | Cannot login | {pg_read_all_stats,pg_stat_scan_tables,pg_signal_backend}
_doadmin_monitor | | {pg_monitor}
_dodb | Superuser, Replication | {}
doadmin | Create role, Create DB, Replication, Bypass RLS | {_doadmin_managed,luckyroot-develop-3}
luckyroot-develop-3 | | {}
postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hey!
Any new users created with
digitalocean_database_user
resource or manually via the DigitalOcean Control Panel, will always havenormal
role, only the default user that comes with database cluster creation hasprimary
role.Additional permissions must be managed manually.
You can either do it manually as described here:
Or you could use the Postgres Terraform provider instead:
Hope that this helps!
- Bobby