Grant postgres_exporter role to deployer role
If the deployer role is not superuser (which is the case in AWS RDS, for example), we need to grant it access to postgres_exporter role before we can create a schema with AUTHORIZATION postgres_exporter.
This commit is contained in:
parent
1ec400b707
commit
81194c9219
|
@ -81,6 +81,8 @@ To be able to collect metrics from pg_stat_activity and pg_stat_replication as n
|
|||
CREATE USER postgres_exporter PASSWORD 'password';
|
||||
ALTER USER postgres_exporter SET SEARCH_PATH TO postgres_exporter,pg_catalog;
|
||||
|
||||
-- If deploying as non-superuser (for example in AWS RDS)
|
||||
-- GRANT postgres_exporter TO :MASTER_USER;
|
||||
CREATE SCHEMA postgres_exporter AUTHORIZATION postgres_exporter;
|
||||
|
||||
CREATE FUNCTION postgres_exporter.f_select_pg_stat_activity()
|
||||
|
|
Loading…
Reference in New Issue