You've already forked postgres_exporter
mirror of
https://github.com/prometheus-community/postgres_exporter.git
synced 2025-08-11 02:43:02 +03:00
Ignore functions that cannot be executed during recovery.
https://github.com/wrouesnel/postgres_exporter/issues/52
This commit is contained in:
committed by
Will Rouesnel
parent
5c587cb725
commit
0de0311c22
@@ -293,8 +293,8 @@ var queryOverrides = map[string][]OverrideQuery{
|
||||
semver.MustParseRange(">=9.2.0"),
|
||||
`
|
||||
SELECT *,
|
||||
pg_current_xlog_location(),
|
||||
pg_xlog_location_diff(pg_current_xlog_location(), replay_location)::float
|
||||
(case pg_is_in_recovery() when 't' then null else pg_current_xlog_location() end) AS pg_current_xlog_location,
|
||||
(case pg_is_in_recovery() when 't' then null else pg_xlog_location_diff(pg_current_xlog_location(), replay_location)::float end) AS pg_xlog_location_diff
|
||||
FROM pg_stat_replication
|
||||
`,
|
||||
},
|
||||
@@ -302,7 +302,7 @@ var queryOverrides = map[string][]OverrideQuery{
|
||||
semver.MustParseRange("<9.2.0"),
|
||||
`
|
||||
SELECT *,
|
||||
pg_current_xlog_location()
|
||||
(case pg_is_in_recovery() when 't' then null else pg_current_xlog_location() end) AS pg_current_xlog_location,
|
||||
FROM pg_stat_replication
|
||||
`,
|
||||
},
|
||||
|
Reference in New Issue
Block a user