Closed kaiko closed 8 months ago
This is a know limitation about log_statement+log_duration versus log_min_duration_statement. In the first case if the duration trace doesn't follow immediately the related statement trace you will have wrong result. This is why it is recommended to use log_min_duration_statement.
Duration is associated with wrong statement if some database requests are excluded.
In the pg log file:
Command:
pgbadger -x txt -q --log-duration --exclude-db spec -i log-file.txt -o report.txt
And slowest queries shows (expecting 'this is real slow' query):
Full logfile content for testing: log-example.log