pgBadger 13.2 Documentation
2 minute read

pgBadger is a fast, standalone PostgreSQL log analyzer written in Perl. It reads PostgreSQL or PgBouncer logs and produces detailed HTML, text, binary, JSON, or raw CSV output. The HTML reports are self-contained, interactive, zoomable, and need only a web browser to view.
Source snapshot: darold/pgbadger at commit
a1ad95a, downloaded on 2026-08-15. The software and its documentation are open source under the PostgreSQL License.
Why pgBadger
pgBadger is designed for large logs and operational use:
- one Perl program, with no mandatory non-core Perl modules;
- automatic detection of
stderr,syslog,csvlog,jsonlog, RDS, Cloud SQL, logplex, Redshift, and PgBouncer input; - direct reading of local files, standard input, remote files over SSH, and HTTP, FTP, or SFTP URLs;
- gzip, bzip2, lz4, xz, zip, and zstd compressed input;
- parallel parsing of one large file or many smaller files;
- daily, weekly, and on-demand monthly incremental reports;
- filters by time, database, user, client, application, process, session, and query pattern.
What the reports contain
The PostgreSQL report set covers:
- overall activity and query statistics;
- slow, frequent, time-consuming, waiting, and cancelled queries;
- temporary files, checkpoints, locks, sessions, and connections;
- autovacuum and autoanalyze activity by table;
- errors and events by severity and class;
- distributions by database, user, client, application, and statement type.
PgBouncer input adds throughput, average query duration, simultaneous sessions, connection and session distributions, reserved-pool usage, and frequent error/event reports.
Documentation map
Read the manual in this order, or use the sidebar to jump directly to a task:
- Download and install pgBadger and its optional modules.
- Review the complete command-line reference.
- Configure PostgreSQL logging with a parseable prefix.
- Choose the right parallel-processing mode.
- Build incremental reports safely.
- Select an output format and inspect the local examples.
- Follow release history, support, and licensing.
Upstream links
Official releases, packages, requirements, and source installation
Complete pgBadger command syntax, options, remote input, return codes, and examples
Configure query logging, log_line_prefix, locale, and supporting statistics for pgBadger
Choose between parallel chunks of one log and parallel processing of many logs
Generate daily and weekly reports, control retention, rebuild output, and add monthly summaries
Choose HTML, text, binary, JSON, or raw CSV output and combine intermediate files
Open complete, error-only, and incremental pgBadger reports from the local site snapshot
Complete pgBadger 9.x through 13.x change history, normalized from the upstream ChangeLog
Report bugs, request features, contribute patches, and find professional PostgreSQL support
PostgreSQL License terms, authorship, and bundled third-party components