pgbadger icon indicating copy to clipboard operation
pgbadger copied to clipboard

pgbadger parsing problem

Open nike7o0 opened this issue 1 month ago • 1 comments

The prefix in postgresql.conf is log_line_prefix = '%t [%p]: [%l-1] user=%u,db=%d,host=%h '

The pgbadger command: pgbadger -vvv -j 2 -t 40 -p '%t [%p]: [%l-1] user=%u,db=%d,host=%h ' -b "$(date +"%Y-%m-%d" --date="today") 08:00:00" -e "$(date +"%Y-%m-%d" --date="today") 20:00:00" -f stderr /var/log/pg_log/postgresql-$(date --date="today" | awk '{print $1;}').log

When using more than one job the html file is broken.If using -j 1, it is working fine.

Also %r in the prefix of both database and pgbadger prefix is not working.Pgbadger cannot parse the queries with %r. The prefix in postgresql.conf is log_line_prefix = '%t [%p]: [%l-1] user=%u,db=%d,host=%r '

The pgbadger command: pgbadger -vvv -j 2 -t 40 -p '%t [%p]: [%l-1] user=%u,db=%d,host=%r ' -b "$(date +"%Y-%m-%d" --date="today") 08:00:00" -e "$(date +"%Y-%m-%d" --date="today") 20:00:00" -f stderr /var/log/pg_log/postgresql-$(date --date="today" | awk '{print $1;}').log

nike7o0 avatar Nov 05 '25 09:11 nike7o0

Commit 8ec00f1 fix parsing of the %r placeholder.

darold avatar Dec 11 '25 07:12 darold