From 790bf5da4d9929c6e86068dd3e8d7a7fc184fe7f Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Wed, 22 Jul 2009 10:53:24 -0400 Subject: [PATCH] Don't use LIMIT in the bloat check if --include is used. Bump version to 2.9.5 --- META.yml | 4 ++-- Makefile.PL | 2 +- check_postgres.pl | 14 +++++++++++--- check_postgres.pl.html | 8 +++++++- 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/META.yml b/META.yml index 981ad65dd..d8393214a 100644 --- a/META.yml +++ b/META.yml @@ -1,6 +1,6 @@ --- #YAML:1.0 name : check_postgres.pl -version : 2.9.4 +version : 2.9.5 abstract : Postgres monitoring script author: - Greg Sabino Mullane @@ -30,7 +30,7 @@ recommends: provides: check_postgres: file : check_postgres.pl - version : 2.9.4 + version : 2.9.5 keywords: - Postgres diff --git a/Makefile.PL b/Makefile.PL index 85b1bbab3..08e7fe4d8 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -6,7 +6,7 @@ use strict; use warnings; use 5.006001; -my $VERSION = '2.9.4'; +my $VERSION = '2.9.5'; if ($VERSION =~ /_/) { print "WARNING! This is a test version ($VERSION) and should not be used in production!\n"; 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 - 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 + + Don't use a LIMIT in check_bloat if --include is used. Per complaint from Jeff Frost. + =item B (July 21, 2009) More French translations (Guillaume Lelarge) diff --git a/check_postgres.pl.html b/check_postgres.pl.html index 358edc4ed..22575936e 100644 --- a/check_postgres.pl.html +++ b/check_postgres.pl.html @@ -101,7 +101,7 @@

NAME

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


@@ -1386,6 +1386,12 @@ feature requests, and commit notices, send email to HISTORY

Items not specifically attributed are by Greg Sabino Mullane.

+
Version 2.9.5
+ +
+
+  Don't use a LIMIT in check_bloat if --include is used. Per complaint from Jeff Frost.
+
Version 2.9.4 (July 21, 2009)
-- 2.30.2