Better detection of stats_command_string being off.
authorGreg Sabino Mullane <[email protected]>
Mon, 20 Feb 2012 20:34:54 +0000 (15:34 -0500)
committerGreg Sabino Mullane <[email protected]>
Mon, 20 Feb 2012 20:34:54 +0000 (15:34 -0500)
Start work to allow txn_idle on old systems.

check_postgres.pl

index 4fc3c00053f27de0ba889627559e2f4d77d2ccf4..6f0b2c3d2d3f1348984e732483ded31dae041992 100755 (executable)
@@ -1729,7 +1729,6 @@ our %testaction = (
                   table_size        => 'VERSION: 8.1',
                   index_size        => 'VERSION: 8.1',
                   query_time        => 'VERSION: 8.1',
-                  txn_idle          => 'VERSION: 8.3',
                   txn_time          => 'VERSION: 8.3',
                   wal_files         => 'VERSION: 8.1',
                   archive_ready     => 'VERSION: 8.1',
@@ -7521,14 +7520,14 @@ sub check_txn_idle {
         ## We do a lot of filtering based on the current_query
         my $cq = $r->{current_query};
 
-        ## Return unknown if we cannot see because we are a non-superuser?
+        ## Return unknown if we cannot see because we are a non-superuser
         if ($cq =~ /insufficient/o) {
             add_unknown msg('psa-nosuper');
             return;
         }
 
-        ## Return unknown if stats_command_string / track_activities is off?
-        if ($cq =~ /disabled/o) {
+        ## Return unknown if stats_command_string / track_activities is off
+        if ($cq =~ /disabled/o or $cq =~ /<command string not enabled>/) {
             add_unknown msg('psa-disabled');
             return;
         }