Skip to content

Commit cc2b38e

Browse files
michael-todorovicn-rodriguez
authored andcommitted
fix: better condition
Signed-off-by: Michael Todorovic <[email protected]>
1 parent 86b396b commit cc2b38e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

collector/pg_stat_checkpointer.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ var (
110110
func (c PGStatCheckpointerCollector) Update(ctx context.Context, instance *instance, ch chan<- prometheus.Metric) error {
111111
db := instance.getDB()
112112

113-
before17 := instance.version.Compare(semver.MustParse("17.0.0"))
114-
if before17 < 0 {
113+
before17 := instance.version.LT(semver.MustParse("17.0.0"))
114+
if before17 {
115115
c.log.Warn("pg_stat_checkpointer collector is not available on PostgreSQL < 17.0.0, skipping")
116116
return nil
117117
}

0 commit comments

Comments
 (0)