Skip to content

Commit 14c9d03

Browse files
authored
4kB size added for postgres with 4kB block_size
Signed-off-by: Sergey Morozov <[email protected]>
1 parent 0adab05 commit 14c9d03

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd/postgres_exporter/pg_setting.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ func (s *pgSetting) normaliseUnit() (val float64, unit string, err error) {
129129
return
130130
case "ms", "s", "min", "h", "d":
131131
unit = "seconds"
132-
case "B", "kB", "MB", "GB", "TB", "8kB", "16kB", "32kB", "16MB", "32MB", "64MB":
132+
case "B", "kB", "MB", "GB", "TB", "4kB", "8kB", "16kB", "32kB", "16MB", "32MB", "64MB":
133133
unit = "bytes"
134134
default:
135135
err = fmt.Errorf("Unknown unit for runtime variable: %q", s.unit)
@@ -158,6 +158,8 @@ func (s *pgSetting) normaliseUnit() (val float64, unit string, err error) {
158158
val *= math.Pow(2, 30)
159159
case "TB":
160160
val *= math.Pow(2, 40)
161+
case "4kB":
162+
val *= math.Pow(2, 12)
161163
case "8kB":
162164
val *= math.Pow(2, 13)
163165
case "16kB":

0 commit comments

Comments
 (0)