]> granicus.if.org Git - pgbadger/commitdiff
Delete current temp file info if we meet an error for the same PID
authorJulien Tachoires <julmon@gmail.com>
Tue, 12 Jun 2018 07:46:23 +0000 (09:46 +0200)
committerJulien Tachoires <julmon@gmail.com>
Tue, 12 Jun 2018 07:46:23 +0000 (09:46 +0200)
pgbadger

index f4ef5a57d5a94507f8b91796384622b8a69c30af..dded3b77d2f20c617cd0fe563e5117e11037ed14 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -12585,6 +12585,11 @@ sub parse_query
                $prefix_vars{'t_query'} =~ s/#011/\t/g;
        }
 
+       # Remove current temp info if we meet an error for the same pid
+       if (($cur_info{$t_pid}{loglevel} =~ $main_error_regex) && exists $cur_temp_info{$t_pid}) {
+               delete $cur_temp_info{$t_pid};
+       }
+
        # Save previous temporary file information with same pid to not overwrite it
        if ($prefix_vars{'t_loglevel'} =~ $main_log_regex) {
                if (($prefix_vars{'t_query'} !~ /temporary file: path .*, size \d+/) && exists $cur_temp_info{$t_pid}) {