From 833e2866390e50b5962848b5f45ca51975af9d78 Mon Sep 17 00:00:00 2001 From: Adrien YHUEL Date: Wed, 5 Jul 2023 09:20:46 +0200 Subject: [PATCH] fix getting track_activity_query_size value (#18) On Postgresql<=11, track_activity_query_size has no unit, so it should be considered as bytes by default --- collector/collector.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/collector/collector.go b/collector/collector.go index ccda568..40456bf 100644 --- a/collector/collector.go +++ b/collector/collector.go @@ -145,6 +145,8 @@ func (c *Collector) snapshot() { querySizeLimit = int(s.Value) case "kB": querySizeLimit = int(s.Value) * 1024 + default: + querySizeLimit = int(s.Value) } break }