@@ -32,7 +32,7 @@ package check_postgres;
32
32
33
33
binmode STDOUT , ' :encoding(UTF-8)' ;
34
34
35
- our $VERSION = ' 2.22.0 ' ;
35
+ our $VERSION = ' 2.22.1 ' ;
36
36
37
37
use vars qw/ %opt $PGBINDIR $PSQL $res $COM $SQL $db / ;
38
38
@@ -3807,12 +3807,12 @@ sub check_bloat {
3807
3807
ROUND(CASE WHEN otta=0 OR sml.relpages=0 OR sml.relpages=otta THEN 0.0 ELSE sml.relpages/otta::numeric END,1) AS tbloat,
3808
3808
CASE WHEN relpages < otta THEN 0 ELSE relpages::bigint - otta END AS wastedpages,
3809
3809
CASE WHEN relpages < otta THEN 0 ELSE bs*(sml.relpages-otta)::bigint END AS wastedbytes,
3810
- CASE WHEN relpages < otta THEN '0 bytes'::text ELSE (bs*(relpages-otta))::bigint || ' bytes' END AS wastedsize,
3810
+ CASE WHEN relpages < otta THEN '0 bytes'::text ELSE (bs*(relpages-otta))::bigint::text || ' bytes' END AS wastedsize,
3811
3811
iname, ituples::bigint AS itups, ipages::bigint AS ipages, iotta,
3812
3812
ROUND(CASE WHEN iotta=0 OR ipages=0 OR ipages=iotta THEN 0.0 ELSE ipages/iotta::numeric END,1) AS ibloat,
3813
3813
CASE WHEN ipages < iotta THEN 0 ELSE ipages::bigint - iotta END AS wastedipages,
3814
3814
CASE WHEN ipages < iotta THEN 0 ELSE bs*(ipages-iotta) END AS wastedibytes,
3815
- CASE WHEN ipages < iotta THEN '0 bytes' ELSE (bs*(ipages-iotta))::bigint || ' bytes' END AS wastedisize,
3815
+ CASE WHEN ipages < iotta THEN '0 bytes' ELSE (bs*(ipages-iotta))::bigint::text || ' bytes' END AS wastedisize,
3816
3816
CASE WHEN relpages < otta THEN
3817
3817
CASE WHEN ipages < iotta THEN 0 ELSE bs*(ipages-iotta::bigint) END
3818
3818
ELSE CASE WHEN ipages < iotta THEN bs*(relpages-otta::bigint)
@@ -8238,7 +8238,7 @@ =head1 NAME
8238
8238
8239
8239
B<check_postgres.pl > - a Postgres monitoring script for Nagios, MRTG, Cacti, and others
8240
8240
8241
- This documents describes check_postgres.pl version 2.22.0
8241
+ This documents describes check_postgres.pl version 2.22.1
8242
8242
8243
8243
=head1 SYNOPSIS
8244
8244
@@ -10122,7 +10122,7 @@ =head1 HISTORY
10122
10122
10123
10123
=over 4
10124
10124
10125
- =item B<Version 2.22.1 > ????, 2015
10125
+ =item B<Version 2.22.1 > Released ????
10126
10126
10127
10127
Add Spanish message translations
10128
10128
(Luis Vazquez)
@@ -10131,6 +10131,10 @@ =head1 HISTORY
10131
10131
non-superuser
10132
10132
(Joshua Elsasser)
10133
10133
10134
+ Add some defensive casting to the bloat query
10135
+ (Greg Sabino Mullane)
10136
+
10137
+
10134
10138
=item B<Version 2.22.0 > June 30, 2015
10135
10139
10136
10140
Add xact timestamp support to hot_standby_delay.
0 commit comments