Don't use LIMIT in the bloat check if --include is used.
authorGreg Sabino Mullane <[email protected]>
Wed, 22 Jul 2009 14:53:24 +0000 (10:53 -0400)
committerGreg Sabino Mullane <[email protected]>
Wed, 22 Jul 2009 14:53:24 +0000 (10:53 -0400)
Bump version to 2.9.5

META.yml
Makefile.PL
check_postgres.pl
check_postgres.pl.html

index 981ad65dd98a0214106053d3887422b1627626eb..d8393214a40d753fb24f6e06fd6f2b07d59cf73b 100644 (file)
--- 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 <[email protected]>
@@ -30,7 +30,7 @@ recommends:
 provides:
   check_postgres:
     file                    : check_postgres.pl
-    version                 : 2.9.4
+    version                 : 2.9.5
 
 keywords:
   - Postgres
index 85b1bbab353ea2fcaa150ade8c854abda7cadb14..08e7fe4d860c1c6844c934c68e42c7dade068459 100644 (file)
@@ -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";
index f894e82386c62b6a82697eee2db62eadfa19d63d..9f8137c4690cea46e7a8a95b13a5339f310051f1 100755 (executable)
@@ -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)
index 358edc4ed0cb9a398786e5e23f68dd96dea23cd7..22575936ea04948d044e99fa743971db6eaf358d 100644 (file)
 <hr />
 <h1><a name="name">NAME</a></h1>
 <p><strong>check_postgres.pl</strong> - a Postgres monitoring script for Nagios, MRTG, Cacti, and others</p>
-<p>This documents describes check_postgres.pl version 2.9.4</p>
+<p>This documents describes check_postgres.pl version 2.9.5</p>
 <p>
 </p>
 <hr />
@@ -1386,6 +1386,12 @@ feature requests, and commit notices, send email to <a href="mailto:check_postgr
 <h1><a name="history">HISTORY</a></h1>
 <p>Items not specifically attributed are by Greg Sabino Mullane.</p>
 <dl>
+<dt><strong><a name="version_2_9_5" class="item"><strong>Version 2.9.5</strong></a></strong></dt>
+
+<dd>
+<pre>
+  Don't use a LIMIT in check_bloat if --include is used. Per complaint from Jeff Frost.</pre>
+</dd>
 <dt><strong><a name="4" class="item"><strong>Version 2.9.4</strong> (July 21, 2009)</a></strong></dt>
 
 <dd>