This commit is contained in:
Francisco Miguel Biete Banon 2025-05-03 17:05:19 +00:00 committed by GitHub
commit 6351e757c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
`, `,
}, },
}, },