mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2025-05-05 17:38:01 +00:00
Merge 955a978e55
into 6526065fbc
This commit is contained in:
commit
6351e757c5
@ -82,6 +82,7 @@ var queryOverrides = map[string][]OverrideQuery{
|
|||||||
SELECT slot_name, database, active,
|
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
|
(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
|
FROM pg_replication_slots
|
||||||
|
WHERE pg_is_in_recovery() = False
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -90,6 +91,7 @@ var queryOverrides = map[string][]OverrideQuery{
|
|||||||
SELECT slot_name, database, active,
|
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
|
(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
|
FROM pg_replication_slots
|
||||||
|
WHERE pg_is_in_recovery() = False
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user