summaryrefslogtreecommitdiff
path: root/check_postgres.pl
diff options
context:
space:
mode:
authorGreg Sabino Mullane2009-07-22 14:53:24 +0000
committerGreg Sabino Mullane2009-07-22 14:53:24 +0000
commit790bf5da4d9929c6e86068dd3e8d7a7fc184fe7f (patch)
treeef90483d46657b11bb6a076d9ced4376d8e05668 /check_postgres.pl
parent5c32d19ac9c4d339b80d628221bf8ba268eee49b (diff)
Don't use LIMIT in the bloat check if --include is used.
Bump version to 2.9.5
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-xcheck_postgres.pl14
1 files changed, 11 insertions, 3 deletions
diff --git a/check_postgres.pl b/check_postgres.pl
index f894e8238..9f8137c46 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -29,7 +29,7 @@ $Data::Dumper::Varname = 'POSTGRES';
$Data::Dumper::Indent = 2;
$Data::Dumper::Useqq = 1;
-our $VERSION = '2.9.4';
+our $VERSION = '2.9.5';
use vars qw/ %opt $PSQL $res $COM $SQL $db /;
@@ -2495,9 +2495,13 @@ FROM (
LEFT JOIN pg_class c2 ON c2.oid = i.indexrelid
) AS sml
WHERE sml.relpages - otta > $MINPAGES OR ipages - iotta > $MINIPAGES
-ORDER BY wastedbytes DESC LIMIT $LIMIT
+ORDER BY wastedbytes DESC
};
+ if (! defined $opt{include}) {
+ $SQL .= " LIMIT $LIMIT";
+ }
+
my $info = run_command($SQL);
if (defined $info->{db}[0] and exists $info->{db}[0]{error}) {
@@ -6040,7 +6044,7 @@ sub show_dbstats {
B<check_postgres.pl> - a Postgres monitoring script for Nagios, MRTG, Cacti, and others
-This documents describes check_postgres.pl version 2.9.4
+This documents describes check_postgres.pl version 2.9.5
=head1 SYNOPSIS
@@ -7450,6 +7454,10 @@ Items not specifically attributed are by Greg Sabino Mullane.
=over 4
+=item B<Version 2.9.5>
+
+ Don't use a LIMIT in check_bloat if --include is used. Per complaint from Jeff Frost.
+
=item B<Version 2.9.4> (July 21, 2009)
More French translations (Guillaume Lelarge)