darold / pgbadger

A fast PostgreSQL Log Analyzer

Home Page:http://pgbadger.darold.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cutted query where CRLF and tab in query

systequ opened this issue · comments

I have a lot of cutted queries after update to pgBadger 12.1:
After checking logs it happened when its CRLF and tab in new line:
Sample:

g.EXAMPLE_5 AS COL5 , CR LF
⟶g.EXAMPLE_6 AS COL6 ,

In "Time consuming queries" the query ends after g.EXAMPLE_5 AS COL5

select [....] g.example_5 as col5, ;

Please attach a file with some lines from your log that are related to the problem. They can be anonymized.

I'm not able to reproduce with the sample, what pgbadger command line are you using?

pgbadger -v -t 40 --extra-files --format stderr --jobs 8 --timezone +2 --incremental --outdir /var/www/html/pgbadger11/customer/ --html-outdir /var/www/html/pgbadger11/customer/ /db/pgbadger11/customer/* --exclude-appname "pg_dump" --exclude-appname "pgbench" --exclude-query "^(VACUUM|ANALYZE)"

How about if you add -p '%t [%p]: [%l-1] app=%a ' to your pgbadger command?

still the same

do you have the same with the sample log you have provided?

Example works:
Screenshot-20230526103220-1020x310
Still the same problem with analyze of all day logs file.

I have the same, the query is complete, you can click on the query to see the scroll cursor or double click on the query to see the formatted query and scroll to see all the query.

With full log i still have the same problem.
Today i tried on the same full day log file
with pgbadger 11.8:
11_8_Screenshot-20230605123704-1051x251
and with 12.1
12_1_Screenshot-20230605123624-1079x267
In the 11.8 problematic queries are not cutted.

Closing, not reproducible with latest development code.