mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2025-04-09 02:31:33 +00:00
Merge pull request #537 from halvaborsch/halvaborsch-replication-slot-patch-1
Fix replication_slot query all supported versions
This commit is contained in:
commit
134e908885
@ -430,7 +430,14 @@ var queryOverrides = map[string][]OverrideQuery{
|
||||
|
||||
"pg_replication_slots": {
|
||||
{
|
||||
semver.MustParseRange(">=9.4.0"),
|
||||
semver.MustParseRange(">=9.4.0 <10.0.0"),
|
||||
`
|
||||
SELECT slot_name, database, active, pg_xlog_location_diff(pg_current_xlog_location(), restart_lsn)
|
||||
FROM pg_replication_slots
|
||||
`,
|
||||
},
|
||||
{
|
||||
semver.MustParseRange(">=10.0.0"),
|
||||
`
|
||||
SELECT slot_name, database, active, pg_wal_lsn_diff(pg_current_wal_lsn(), restart_lsn)
|
||||
FROM pg_replication_slots
|
||||
|
Loading…
Reference in New Issue
Block a user