darold / pgbadger

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

What is exactly the purpose of pgbadger parameter --dump-all-queries #763

Closed tabdoelhafiezkhan closed 1 year ago

tabdoelhafiezkhan commented 1 year ago

Hello,

I get this FATAL message when I use --dump-all-queries.

$ pgbadger -d dorba --dump-all-queries --outfile pgbadger.html postgresql-Thu.log FATAL: dump of normalized queries can be done in text output format, please use .txt extension.

- Error at line 788

When I change the outputfile pgbadger.html to pgbadger.txt., the queries are dumped in plain ascii.

$ pgbadger -d dorba --dump-all-queries -s 3 --outfile pgbadger.txt postgresql-Thu.log [========================>] Parsed 32075 bytes of 32075 (100.00%), queries: 5, events: 0

What is the purpose of parameter --dump-all-queries and why can't I generate the html report when using this parameter?

regards, Tim

darold commented 1 year ago

Hi TIm,

The documentation says:

    --dump-all-queries     : dump all queries found in the log file replacing
                             bind parameters included in the queries at their
                 respective placeholders positions.

meaning that when this option is used it will just dump all queries into a plain text file. This is mainly used to extract the queries from the log file and use them for other purpose. No report are generated with this option, just simply queries extraction.

tabdoelhafiezkhan commented 1 year ago

Hi Darold,

Thanks. I thought so ;-)

regards, Tim