darold / pgbadger

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

Incremental reports not working after upgrade to 11.6 via apt #692

Closed dudleyperkins closed 3 years ago

dudleyperkins commented 3 years ago

Hey guys,

we are using the official postgre-apt-repository and last Friday we upgraded from 11.4 to 11.6 (i just then realized 11.5 never made it to the repo)

http://apt.postgresql.org/pub/repos/apt/ 11.4-1.pgdg100+1 upgrade to 11.6-1.pgdg100+1

Here is the call we've been using for years without a problem: /usr/bin/pgbadger -j 6 -R 5 -I -d dbname --prefix '%t [%p]: [%l] user=%u,db=%d,app=%a ' /daten/pg_log/dbname-master/postgresql-13-dbname.log -O /var/www/apache/stats/pgbadger/dbname-master/

Now before the output looked like this: .. [========================>] Parsed 205386364 bytes of 205386364 (100.00%), queries: 2941, events: 43 LOG: Ok, generating HTML daily report into /var/www/apache/stats/pgbadger/dbname-master//2021/09/08/... LOG: Ok, generating HTML weekly report into /var/www/apache/stats/pgbadger/dbname-master//2021/week-37/... LOG: Ok, generating global index to access incremental reports...

After the upgrade it's just: .. [=======================> ] Parsed 259374881 bytes of 259957812 (99.78%), queries: 2902, events: 151 [========================>] Parsed 259957812 bytes of 259957812 (100.00%), queries: 3109, events: 156 LOG: Ok, generating global index to access incremental reports...

Well the binary-file is created successfully, what's missing is the creation/rebuild of the daily and weekly html.

Did something fundamentally changed or did i just overlooked anything? Been looking at changelogs from 11.5 and 11.6.

I can manually run 'pgbadger bin-file -o index.html' on a day and get the html, but i would bee easier to get it in one step like before.

darold commented 3 years ago

Commit 489ac52 might fix this issue. Thanks for the report.

dudleyperkins commented 3 years ago

well thank you - the commit fixes the problem. Just tested it on our logging server an everything looked good.

two follow-up questions (if you have the time)

darold commented 3 years ago

I don 't know why 11.5 is not in the repo, maybe this is a miss. However, 11.5 was suffering the same bug. Once I publish a new pgbadger version it is packaged in the following days so you will not have to wait too long time.

I still have an issue to fix with --dbname and once it is done I will publish a new release.