]> granicus.if.org Git - pgbadger/commitdiff
Session count is immediately decreased when a FATAL error is received in the current...
authorDarold Gilles <gilles@darold.net>
Thu, 7 Aug 2014 18:00:51 +0000 (20:00 +0200)
committerDarold Gilles <gilles@darold.net>
Thu, 7 Aug 2014 18:00:51 +0000 (20:00 +0200)
pgbadger

index 1d90a167dc8be7237290e58301eab12271865ed2..0fedc9d523f3ab877fa348adcab6d1112a50cb5d 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -183,6 +183,7 @@ my $ssh_user = '';
 my $ssh_timeout = 10;
 my $ssh_options = "-o ConnectTimeout=$ssh_timeout -o PreferredAuthentications=hostbased,publickey";
 
+# OBSOLETE, to be removed
 # List of regex that match fatal error message that do not
 # generate disconnection line in log. This is to prevent
 # sessions in the sessions charts to increase continually.
@@ -8576,6 +8577,7 @@ sub parse_log_prefix
        }
 }
 
+# OBSOLETE: to be removed
 sub is_session_closed
 {
        map { return 1 if ($_[0] =~ $_); } @session_closed_msg;
@@ -8603,10 +8605,8 @@ sub parse_query
        }
 
        # Remove session failure from current workload because there is no disconnection entry
-       if (   ($prefix_vars{'t_loglevel'} eq 'FATAL')
-               && &is_session_closed($prefix_vars{'t_query'}) )
-       {
-               delete $current_sessions{$prefix_vars{'t_pid'}} if (!$disable_session);
+       if (!$disable_session && ($prefix_vars{'t_loglevel'} eq 'FATAL')) {
+               delete $current_sessions{$prefix_vars{'t_pid'}};
                if ($extension eq 'tsung') {
                        delete $tsung_session{$prefix_vars{'t_pid'}}
                }