From 6896c24e95b87f5e78e33b578b7cf5998702fba1 Mon Sep 17 00:00:00 2001 From: Julien Tachoires Date: Tue, 12 Jun 2018 09:46:23 +0200 Subject: [PATCH] Delete current temp file info if we meet an error for the same PID --- pgbadger | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pgbadger b/pgbadger index f4ef5a5..dded3b7 100755 --- 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}) { -- 2.40.0