]> granicus.if.org Git - pgbadger/commitdiff
Add warning about parallel processing disabled with csvlog. Thanks to cstdenis for...
authorGilles Darold <gilles.darold@dalibo.com>
Fri, 9 Nov 2018 12:40:40 +0000 (13:40 +0100)
committerGilles Darold <gilles.darold@dalibo.com>
Fri, 9 Nov 2018 12:40:40 +0000 (13:40 +0100)
pgbadger

index e20c3da67de5f98b1698547117cecf036ae3cc3d..49817b6cbebb255d3f9ad2f9f66ea21d6a0885fe 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -2685,7 +2685,12 @@ sub process_file
        # Parse PostgreSQL log file with CSV format
        } elsif ($fmt eq 'csv') {
 
+               if ($queue_size > 1 || $job_per_file > 1) {
+                       &logmsg('WARNING', "parallel processing is disabled with csvlog format.");
+               }
+
                require Text::CSV_XS;
+
                my $csv = Text::CSV_XS->new(
                        {
                                binary => 1,
@@ -2698,7 +2703,6 @@ sub process_file
                # Parse csvlog lines
                CSVLOOP: while (!$csv->eof()) {
                        while (my $row = $csv->getline($lfile)) {
-
                                $row =~ s/\r//;
 
                                # We received a signal