# Custom postgres_exporter queries (Alloy prometheus.exporter.postgres custom_queries_config_path). # Metric name = _: pg_is_wal_replay_paused (used by the DbReplicationLag rule, design 4.3). pg_is_wal_replay: query: "SELECT CASE WHEN pg_is_in_recovery() AND pg_is_wal_replay_paused() THEN 1 ELSE 0 END AS paused" master: true metrics: - paused: usage: "GAUGE" description: "1 when this server is a replica and WAL replay is paused"