Skip to content

Commit a4645ea

Browse files
Removed unnecessary grants from readme, changed naming in multixact_size metric to be more specific
1 parent e6eb075 commit a4645ea

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ create user postgres_ai_mon with password '<password>';
9595
grant connect on database <database_name> to postgres_ai_mon;
9696

9797
grant pg_monitor to postgres_ai_mon;
98-
grant select on pg_stat_statements to postgres_ai_mon;
99-
grant select on pg_stat_database to postgres_ai_mon;
100-
grant select on pg_stat_user_tables to postgres_ai_mon;
101-
grant select on pg_stat_user_indexes to postgres_ai_mon;
10298
grant select on pg_index to postgres_ai_mon;
10399

104100
-- Create a public view for pg_statistic access (optional, for bloat analysis)

config/pgwatch-prometheus/metrics.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2214,11 +2214,11 @@ metrics:
22142214
) as has_rds_fn,
22152215
coalesce(pg_has_role('pg_read_server_files','usage'), false) as has_read_files,
22162216
(select rolsuper from pg_roles where rolname = current_user) as is_super,
2217-
exists (select from pg_proc where proname = 'pg_ls_dir') as has_ls,
2218-
exists (select 1 from pg_proc where proname = 'pg_stat_file') as has_stat
2217+
exists (select from pg_proc where proname = 'pg_ls_dir') as has_pg_ls_dir_func,
2218+
exists (select from pg_proc where proname = 'pg_stat_file') as has_pg_stat_file_func
22192219
),
22202220
can_local as (
2221-
select (has_ls and has_stat and (has_read_files or is_super)) as ok from env
2221+
select (has_pg_ls_dir_func and has_pg_stat_file_func and (has_read_files or is_super)) as ok from env
22222222
),
22232223
-- Use query_to_xml to safely execute RDS-specific multixact directory listing query.
22242224
-- The XML wrapper allows the query to fail gracefully if rds_tools.pg_ls_multixactdir()

0 commit comments

Comments
 (0)