]> granicus.if.org Git - pgbadger/commitdiff
Fix some parsing issue with log generated by pg 7.4
authorDarold Gilles <gilles@darold.net>
Mon, 13 May 2013 09:54:31 +0000 (11:54 +0200)
committerDarold Gilles <gilles@darold.net>
Mon, 13 May 2013 09:54:31 +0000 (11:54 +0200)
pgbadger

index e058d83dd4f40d2514a07eb9c296ad7a26f60d54..d6c1e591763bb8a1c0964b4b2cef186d487da34a 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -1365,7 +1365,11 @@ sub process_file
                                # Collect additional query information
                                } elsif ($cur_pid && ($line !~ $orphan_stderr_line)) {
 
-                                       if ($cur_info{$cur_pid}{vacuum} && ($line =~ /^\t(pages|tuples|buffer usage|avg read rate|system usage):/)) {
+                                       if ($line =~ s/^(STATEMENT|DETAIL|HINT):\s+//) {
+                                               $line =~ s/ERROR:\s+//;
+                                               $cur_info{$cur_pid}{"\L$1\E"} = $line;
+                                               next;
+                                       } elsif ($cur_info{$cur_pid}{vacuum} && ($line =~ /^\t(pages|tuples|buffer usage|avg read rate|system usage):/)) {
                                                if ($line =~ /^\t(pages|tuples): (\d+) removed, (\d+) remain/) {
                                                        $autovacuum_info{tables}{$cur_info{$cur_pid}{vacuum}}{$1}{removed} += $2;
                                                }
@@ -5834,6 +5838,7 @@ sub normalize_error
        $orig_query =~ s/\(.*\)/\(...\)/g;
        $orig_query =~ s/column .* does not exist/column "..." does not exist/;
        $orig_query =~ s/(database system was shut down at).*/$1 .../;
+       $orig_query =~ s/(relation) \d+ (deleted while still in use)/$1 ... $2/g;
 
        # Need more normalization stuff here