diff --git a/cmd/postgres_exporter/queries.go b/cmd/postgres_exporter/queries.go index 80be72d5..d2dc8b72 100644 --- a/cmd/postgres_exporter/queries.go +++ b/cmd/postgres_exporter/queries.go @@ -82,6 +82,7 @@ var queryOverrides = map[string][]OverrideQuery{ SELECT slot_name, database, active, (case pg_is_in_recovery() when 't' then pg_xlog_location_diff(pg_last_xlog_receive_location(), restart_lsn) else pg_xlog_location_diff(pg_current_xlog_location(), restart_lsn) end) as pg_xlog_location_diff FROM pg_replication_slots + WHERE pg_is_in_recovery() = False `, }, { @@ -90,6 +91,7 @@ var queryOverrides = map[string][]OverrideQuery{ SELECT slot_name, database, active, (case pg_is_in_recovery() when 't' then pg_wal_lsn_diff(pg_last_wal_receive_lsn(), restart_lsn) else pg_wal_lsn_diff(pg_current_wal_lsn(), restart_lsn) end) as pg_wal_lsn_diff FROM pg_replication_slots + WHERE pg_is_in_recovery() = False `, }, },