# pgBadger 13.2 Documentation

> Fast PostgreSQL and PgBouncer log analysis with detailed, self-contained reports

---

LLMS index: [llms.txt](/llms.txt)

---

![pgBadger logo](/img/docs/pgbadger/logo.png "pgBadger")

**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](https://github.com/darold/pgbadger) at commit [`a1ad95a`](https://github.com/darold/pgbadger/commit/a1ad95a035a0c2d246fe632eb1c361d4bde0ddae), downloaded on 2026-08-15. The software and its documentation are open source under the PostgreSQL License.

## Why pgBadger {#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 {#report-coverage}

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 {#documentation-map}

Read the manual in this order, or use the sidebar to jump directly to a task:

1. [Download and install](download/) pgBadger and its optional modules.
2. Review the complete [command-line reference](command-line/).
3. Configure [PostgreSQL logging](postgresql-logging/) with a parseable prefix.
4. Choose the right [parallel-processing](parallel-processing/) mode.
5. Build [incremental reports](incremental-reports/) safely.
6. Select an [output format](output-formats/) and inspect the [local examples](sample-reports/).
7. Follow [release history](releases/), [support](support/), and [licensing](license/).

## Upstream links {#upstream-links}

- [Project website](https://pgbadger.darold.net/)
- [Source code](https://github.com/darold/pgbadger)
- [Releases](https://github.com/darold/pgbadger/releases)
- [Issue tracker](https://github.com/darold/pgbadger/issues)

---

Section pages:

- [Download and Installation](/docs/pgbadger/download/): Official releases, packages, requirements, and source installation
- [Command-Line Reference](/docs/pgbadger/command-line/): Complete pgBadger command syntax, options, remote input, return codes, and examples
- [PostgreSQL Logging Configuration](/docs/pgbadger/postgresql-logging/): Configure query logging, log_line_prefix, locale, and supporting statistics for pgBadger
- [Parallel Processing](/docs/pgbadger/parallel-processing/): Choose between parallel chunks of one log and parallel processing of many logs
- [Incremental Reports](/docs/pgbadger/incremental-reports/): Generate daily and weekly reports, control retention, rebuild output, and add monthly summaries
- [Output Formats](/docs/pgbadger/output-formats/): Choose HTML, text, binary, JSON, or raw CSV output and combine intermediate files
- [Sample Reports](/docs/pgbadger/sample-reports/): Open complete, error-only, and incremental pgBadger reports from the local site snapshot
- [Release History](/docs/pgbadger/releases/): Complete pgBadger 9.x through 13.x change history, normalized from the upstream ChangeLog
- [Support and Contributing](/docs/pgbadger/support/): Report bugs, request features, contribute patches, and find professional PostgreSQL support
- [License and Credits](/docs/pgbadger/license/): PostgreSQL License terms, authorship, and bundled third-party components
