Fix some old code paths so the txn_idle tests work again.
authorGreg Sabino Mullane <greg@endpoint.com>
Wed, 7 Apr 2010 18:46:14 +0000 (14:46 -0400)
committerGreg Sabino Mullane <greg@endpoint.com>
Wed, 7 Apr 2010 18:46:14 +0000 (14:46 -0400)
check_postgres.pl

index f331770da9d148337a54afe9d9ed9ff835f5fbed..eafdea1aab02aee285a3db1eb4552739a5bdb9d1 100755 (executable)
@@ -6611,12 +6611,12 @@ sub check_txn_idle {
                        $max = $current if $current > $max;
                }
                if ($MRTG) {
-                       $stats{$db->{dbname}} = $max;
+                       $stats{$db->{dbname}} = $max < 0 ? 0 : $max;
                        next;
                }
                $db->{perf} .= msg('maxtime', $max);
                if ($max < 0) {
-                       add_unknown 'T-EXCLUDE-DB';
+                       add_unknown msg('txnidle-none');
                        next;
                }
 
@@ -6710,7 +6710,6 @@ WHERE xact_start IS NOT NULL $USERWHERECLAUSE
        ## Use of skip_item means we may have no matches
        if ($maxdb eq '?') {
                if ($USERWHERECLAUSE) { ## needed?
-                       #add_unknown 'T-EXCLUDE-DB';
                        add_unknown msg('tttt-nomatch');
                }
                else {