darold / pgbadger

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

LOG events presented as ERROR entries #807

Closed MattiL closed 9 months ago

MattiL commented 10 months ago

LOG events are shown as ERROR entries in Events - Events distribution graph and legend by pgbadger 12.2. That is misleading.

darold commented 10 months ago

Hi,

I do not see in the code how this can happen. Some events are temporarily turned into error to be part of the event/error report but before being reported they have turned back to the right level. Can you post the log lines from the log that are concerned by this bug?

MattiL commented 10 months ago

LOG: could not receive data from client: Vastapää sulki yhteyden LOG: process ... still waiting for RowExclusiveLock on relation ... of database ... after ... ms

darold commented 9 months ago

Commit 6412413 might fix this issue. Can you confirm, please?

darold commented 9 months ago

Commit 518d6bc fixes the HTML error report.

MattiL commented 7 months ago

In report generated by pgBadger 12.4, Events distribution still counts as ERRORs the following LOG entries. LOG: could not receive data from client: Vastapää sulki yhteyden LOG: process ... still waiting for RowExclusiveLock on relation ... of database ... after ... ms LOG: process ... still waiting for AccessExclusiveLock on object 0 of class 1262 of database ... after ...

darold commented 7 months ago

Right, I have decide to rewrite this part and made some changes in the reports. Commit c05d599 fixes this issue.

    Change the way LOG level events reported in the Events reports are
    stored. Some of them was still reported and counted as errors instead
    as LOG level entries. The fix is to stored and report them as EVENTLOG
    to differentiate them from queries. This change introduce a backward
    compatibility break when pgbadger is used in incremental mode. You will
    just have the double behavior during the week of the upgrade.