Download and Installation
2 minute read
Sources: official download section and the pinned upstream
README.md.
Choose a distribution channel
| Channel | Use it for | Location |
|---|---|---|
| Official release | Source tarballs and release notes | GitHub Releases |
| RPM package | RPM-based Linux distributions | PostgreSQL Yum Repository |
| Debian/Ubuntu package | APT-based Linux distributions | PostgreSQL Apt Repository |
| Development source | Current unreleased code | darold/pgbadger |
The documentation snapshot in this site is based on the 13.2 source tree. Always check the release page before downloading: the local snapshot is intentionally fixed, while upstream releases continue to change.
Requirements
The HTML report path needs only:
- a modern Perl distribution;
- a web browser to render the embedded JavaScript charts.
Optional capabilities add the following dependencies:
| Capability | Dependency |
|---|---|
| Parse PostgreSQL CSV logs | Text::CSV_XS |
| Write JSON output | JSON::XS |
Read .gz, .bz2, .lz4, .xz, .zip, or .zst input |
the matching zcat, bzcat, lz4cat, xz, unzip, or zstdcat utility |
Install JSON support on Debian or Ubuntu:
On an RPM-based system:
Use --zcat to override a decompressor path. Supplying one custom command disables mixing different compressed formats in the same invocation.
Install from an official tarball
Download a release archive, then build and install it with Perl’s standard toolchain:
The default site layout installs the program as /usr/local/bin/pgbadger and the manual page as /usr/local/share/man/man1/pgbadger.1.
For a distribution-style installation under /usr, generate the Makefile with:
INSTALLDIRS=perl is another upstream-supported layout. Inspect the generated paths before installing into a managed system.
Install development code
Development code may contain changes not yet covered by a release note. Prefer a tagged archive for reproducible production packaging.
Verify the installation
Continue with the command-line reference and PostgreSQL logging configuration.