From 81194c92194402d5a79f87a11247d80039d6ed66 Mon Sep 17 00:00:00 2001 From: Alexander Savchuk Date: Fri, 9 Jun 2017 14:40:29 +1200 Subject: [PATCH] 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. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3d66839b..df350036 100644 --- a/README.md +++ b/README.md @@ -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()