Assigning roles PostgreSQL
Managed Service for PostgreSQL lets you create your own roles in PostgreSQL databases, but it doesn't let you access the default roles. A special mdb_admin
role is provided for users who aren't DB owners, but need administrative privileges.
To assign a user role, use the Yandex.Cloud CLI or API: role assignment from a GRANT
request is canceled when the next database operation is performed.
The mdb_admin role
The mdb_admin
role includes the following privileges:
- Use system role privileges:
pg_monitor
pg_signal_backend
- Use subscriptions for logical replication (
CREATE | DROP | ALTER SUBSCRIPTION
). - Use extensions:
dblink
pg_repack
postgres_fdw
- Use extension-specific functions:
pg_stat_kcache_reset()
from thepg_stat_kcache
extension.pg_stat_reset()
andpg_stat_statements_reset()
from thepg_stat_statements
extension.