From a627e7fce7027dbfe13b587ede66ccaad6e1f6ba Mon Sep 17 00:00:00 2001 From: bravosierrasierra Date: Fri, 29 Jul 2022 13:33:23 +0300 Subject: [PATCH] fix for exporter issue 633 fix for exporter issue 633: https://github.com/prometheus-community/postgres_exporter/issues/633 "Scan error on column index 2, name \"checkpoint_write_time\": converting driver.Value type float64 (\"6.594096e+06\") to a int: invalid syntax #633" Signed-off-by: bravosierrasierra --- collector/pg_stat_bgwriter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collector/pg_stat_bgwriter.go b/collector/pg_stat_bgwriter.go index f897dbe2c..482b74e98 100644 --- a/collector/pg_stat_bgwriter.go +++ b/collector/pg_stat_bgwriter.go @@ -122,7 +122,7 @@ func (PGStatBGWriterCollector) Update(ctx context.Context, db *sql.DB, ch chan<- var cpt int var cpr int - var cpwt int + var cpwt float64 var cpst int var bcp int var bc int