mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2025-04-08 02:01:23 +00:00
fix: better condition
Signed-off-by: Michael Todorovic <michael.todorovic@outlook.com>
This commit is contained in:
parent
1c66044856
commit
d55dd27b78
@ -110,8 +110,8 @@ var (
|
|||||||
func (c PGStatCheckpointerCollector) Update(ctx context.Context, instance *instance, ch chan<- prometheus.Metric) error {
|
func (c PGStatCheckpointerCollector) Update(ctx context.Context, instance *instance, ch chan<- prometheus.Metric) error {
|
||||||
db := instance.getDB()
|
db := instance.getDB()
|
||||||
|
|
||||||
before17 := instance.version.Compare(semver.MustParse("17.0.0"))
|
before17 := instance.version.LT(semver.MustParse("17.0.0"))
|
||||||
if before17 < 0 {
|
if before17 {
|
||||||
c.log.Warn("pg_stat_checkpointer collector is not available on PostgreSQL < 17.0.0, skipping")
|
c.log.Warn("pg_stat_checkpointer collector is not available on PostgreSQL < 17.0.0, skipping")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user