From 8be6636c730a90340a976831fcd2dd85f1698fb4 Mon Sep 17 00:00:00 2001 From: "andres.suarez" Date: Wed, 26 Aug 2026 09:19:12 +0200 Subject: [PATCH] feat: enable built-in database_wraparound collector in postgres_exporter postgres_exporter (v0.15.0, pinned in this repo's Ansible) already ships a database_wraparound collector reading both datfrozenxid and datminmxid from pg_database, covering XID and MultiXactId wraparound risk. It is defaultDisabled (registered via collector.database_wraparound.go), so it needs an explicit --collector.database_wraparound flag to turn on. Supersedes the custom pg_wraparound query added in the previous commits on this branch: that approach only tracked XID age and missed MultiXactId wraparound, a separate, independently-reachable shutdown condition. Mirrors the same pivot in supabase/salt#825. Exposes per-database: - pg_database_wraparound_age_datfrozenxid_seconds (XID age) - pg_database_wraparound_age_datminmxid_seconds (MultiXactId age) Related: INDATA-1261 --- ansible/files/postgres_exporter.service.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/files/postgres_exporter.service.j2 b/ansible/files/postgres_exporter.service.j2 index 4cf067a9a..3dc57ef09 100644 --- a/ansible/files/postgres_exporter.service.j2 +++ b/ansible/files/postgres_exporter.service.j2 @@ -6,7 +6,7 @@ StartLimitBurst=0 [Service] Type=simple -ExecStart=/opt/postgres_exporter/postgres_exporter --disable-settings-metrics --extend.query-path="/opt/postgres_exporter/queries.yml" --disable-default-metrics --no-collector.locks --no-collector.replication --no-collector.replication_slot --no-collector.stat_bgwriter --no-collector.stat_database --no-collector.stat_user_tables --no-collector.statio_user_tables --no-collector.wal {% if qemu %}--no-collector.database {% endif %} +ExecStart=/opt/postgres_exporter/postgres_exporter --disable-settings-metrics --extend.query-path="/opt/postgres_exporter/queries.yml" --disable-default-metrics --no-collector.locks --no-collector.replication --no-collector.replication_slot --no-collector.stat_bgwriter --no-collector.stat_database --no-collector.stat_user_tables --no-collector.statio_user_tables --no-collector.wal --collector.database_wraparound {% if qemu %}--no-collector.database {% endif %} User=postgres Group=postgres