darold / pgbadger

A fast PostgreSQL Log Analyzer
http://pgbadger.darold.net/
PostgreSQL License
3.45k stars 348 forks source link

Cutted query where CRLF and tab in query #779

Closed systequ closed 5 months ago

systequ commented 1 year ago

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, ;

darold commented 1 year ago

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

systequ commented 1 year ago

779.log

darold commented 1 year ago

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

systequ commented 1 year ago

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)"

darold commented 1 year ago

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

systequ commented 1 year ago

still the same

darold commented 1 year ago

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

systequ commented 1 year ago

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

darold commented 1 year ago

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.

systequ commented 1 year ago

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.

darold commented 5 months ago

Closing, not reproducible with latest development code.