Skip to content

pgbadger report not returning any queries #877

@andu-c

Description

@andu-c

Hello all,

I need your help with find out why pgbadger doesn't find any queries in postgresql logs, even though I have millions of lines and I've set the config as required in the documentation. I've tried all sorts of settings with no luck.
I leave here a part of my postgres logs

2026-04-20 14:08:35.136 EEST [285550]: [1896-1] user=,db=,app=PostgreSQL JDBC Driver,client=*** LOG: duration: 0.036 ms bind S_4: select rrje1_0.pid,rrje1_0.job_deleted,rrje1_0.reindex_count,rrje1_0.res_type,rrje1_0.suspended_until,rrje1_0.update_threshold_high,rrje1_0.update_threshold_low from hfj_res_reindex_job rrje1_0 where rrje1_0.job_deleted=$1 fetch first $2 rows only
2026-04-20 14:08:35.136 EEST [285550]: [1897-1] user=,db=,app=PostgreSQL JDBC Driver,client=*** DETAIL: parameters: $1 = 'f', $2 = '10'
2026-04-20 14:08:35.136 EEST [285550]: [1898-1] user=,db=,app=PostgreSQL JDBC Driver,client=*** LOG: duration: 0.012 ms execute S_4: select rrje1_0.pid,rrje1_0.job_deleted,rrje1_0.reindex_count,rrje1_0.res_type,rrje1_0.suspended_until,rrje1_0.update_threshold_high,rrje1_0.update_threshold_low from hfj_res_reindex_job rrje1_0 where rrje1_0.job_deleted=$1 fetch first $2 rows only
2026-04-20 14:08:35.136 EEST [285550]: [1899-1] user=,db=,app=PostgreSQL JDBC Driver,client=*** DETAIL: parameters: $1 = 'f', $2 = '10'
2026-04-20 14:08:35.137 EEST [285550]: [1900-1] user=,db=,app=PostgreSQL JDBC Driver,client=*** LOG: duration: 0.015 ms bind S_1: COMMIT
2026-04-20 14:08:35.137 EEST [285550]: [1901-1] user=,db=,app=PostgreSQL JDBC Driver,client=*** LOG: duration: 0.014 ms execute S_1: COMMIT
2026-04-20 14:08:35.910 EEST [285550]: [1902-1] user=,db=,app=PostgreSQL JDBC Driver,client=*** LOG: duration: 0.024 ms parse :
2026-04-20 14:08:35.910 EEST [285550]: [1903-1] user=,db=,app=PostgreSQL JDBC Driver,client=*** LOG: duration: 0.007 ms bind :
2026-04-20 14:08:35.911 EEST [285550]: [1904-1] user=,db=,app=PostgreSQL JDBC Driver,client=*** LOG: duration: 0.006 ms parse :

And config:
log_autovacuum_min_duration=0
log_checkpoints=on
log_connections=on
log_disconnections=on
log_error_verbosity=default
log_line_prefix='%m [%p]: [%l-1] user=%u,db=%d,app=%a,client=%h '
log_lock_waits=on
log_statement=none
log_temp_files=0

Adding also pgbadger output for a small part of postgres log:
[root@syropp-postgresql ~]# /usr/local/bin/pgbadger -v --prefix '%m [%p]: user=%u,db=%d,app=%a,client=%h ' -p 3 test_log.log -o reportM.htDEBUG: pgBadger version 13.2.
DEBUG: Output 'html' reports will be written to reportM.html
DEBUG: BIN/HTML Retention cleanup: Initial cleanup flags - noclean=[0] - retention_bin=[5] - retention_html=[0] - saved_last_line{datetime}- pgb_saved_last_line{datetime}=[] - all_outdir=[./]
DEBUG: Starting progressbar writer process
DEBUG: Autodetected log format 'stderr' from test_log.log
DEBUG: pgBadger will use log format stderr to parse test_log.log.
DEBUG: timezone not specified, using -10800 seconds
DEBUG: Processing log file: test_log.log
DEBUG: Starting reading file "test_log.log"...
DEBUG: Start parsing postgresql log at offset 0 of file "test_log.log" to 3256642
[========================>] Parsed 3256642 bytes of 3256642 (100.00%), queries: 0, events: 0
DEBUG: the log statistics gathering took: 2 wallclock secs ( 0.01 usr 0.01 sys + 0.17 cusr 0.01 csys = 0.20 CPU)
DEBUG: Output 'html' reports will be written to .//reportM.html
LOG: Ok, generating html report...
DEBUG: building reports took: 0 wallclock secs ( 0.01 usr + 0.00 sys = 0.01 CPU)
DEBUG: the total execution time took: 2 wallclock secs ( 0.02 usr 0.01 sys + 0.17 cusr 0.01 csys = 0.21 CPU)

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions