summaryrefslogtreecommitdiff
path: root/check_postgres.pl
diff options
context:
space:
mode:
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-xcheck_postgres.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/check_postgres.pl b/check_postgres.pl
index d11dc5d76..6482aa407 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -3531,9 +3531,9 @@ SELECT
CASE WHEN ipages < iotta THEN 0 ELSE bs*(ipages-iotta) END AS wastedibytes,
CASE WHEN ipages < iotta THEN '0 bytes' ELSE (bs*(ipages-iotta))::bigint || ' bytes' END AS wastedisize,
CASE WHEN relpages < otta THEN
- CASE WHEN ipages < iotta THEN 0 ELSE ipages-iotta::bigint END
- ELSE CASE WHEN ipages < iotta THEN relpages-otta::bigint
- ELSE relpages-otta::bigint + ipages-iotta::bigint END
+ CASE WHEN ipages < iotta THEN 0 ELSE bs*(ipages-iotta::bigint) END
+ ELSE CASE WHEN ipages < iotta THEN bs*(relpages-otta::bigint)
+ ELSE bs*(relpages-otta::bigint + ipages-iotta::bigint) END
END AS totalwastedbytes
FROM (
SELECT