File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
config/pgwatch-prometheus Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -2220,6 +2220,9 @@ metrics:
22202220 can_local as (
22212221 select (has_ls and has_stat and (has_read_files or is_super)) as ok from env
22222222 ),
2223+ -- Use query_to_xml to safely execute RDS-specific multixact directory listing query.
2224+ -- The XML wrapper allows the query to fail gracefully if rds_tools.pg_ls_multixactdir()
2225+ -- is unavailable or returns errors, preventing the entire metric from failing.
22232226 rds_probe_xml as (
22242227 select query_to_xml($q$
22252228 with files as (
@@ -2242,6 +2245,9 @@ metrics:
22422245 $q$, true, true, '') as x
22432246 where (select has_rds_fn from env)
22442247 ),
2248+ -- Use query_to_xml to safely execute standard Postgres multixact directory listing query.
2249+ -- The XML wrapper allows the query to fail gracefully if pg_stat_file() or pg_ls_dir()
2250+ -- are unavailable or return permission errors, preventing the entire metric from failing.
22452251 local_probe_xml as (
22462252 select query_to_xml($q$
22472253 with dirs as (
You can’t perform that action at this time.
0 commit comments