Skip to content

Download and Installation

Official releases, packages, requirements, and source installation

Choose a distribution channel

ChannelUse it forLocation
Official releaseSource tarballs and release notesGitHub Releases
RPM packageRPM-based Linux distributionsPostgreSQL Yum Repository
Debian/Ubuntu packageAPT-based Linux distributionsPostgreSQL Apt Repository
Development sourceCurrent unreleased codedarold/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:

CapabilityDependency
Parse PostgreSQL CSV logsText::CSV_XS
Write JSON outputJSON::XS
Read .gz, .bz2, .lz4, .xz, .zip, or .zst inputthe matching zcat, bzcat, lz4cat, xz, unzip, or zstdcat utility

Install JSON support on Debian or Ubuntu:

$ sudo apt-get install libjson-xs-perl

On an RPM-based system:

$ sudo yum install perl-JSON-XS

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:

$ tar xzf pgbadger-13.2.tar.gz
$ cd pgbadger-13.2
$ perl Makefile.PL
$ make
$ sudo make install

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:

$ perl Makefile.PL INSTALLDIRS=vendor
$ make
$ sudo make install

INSTALLDIRS=perl is another upstream-supported layout. Inspect the generated paths before installing into a managed system.

Install development code

$ git clone https://github.com/darold/pgbadger.git
$ cd pgbadger
$ perl Makefile.PL
$ make
$ make test
$ sudo make install

Development code may contain changes not yet covered by a release note. Prefer a tagged archive for reproducible production packaging.

Verify the installation

$ pgbadger --version
$ pgbadger --help

Continue with the command-line reference and PostgreSQL logging configuration .