Skip to content
Home › SQL Tools › pgBadger
Tool Review · Database Monitoring

pgBadger

pgBadger is a free, open source PostgreSQL log analyser: a single Perl script that turns PostgreSQL (and PgBouncer) log files into detailed HTML reports on queries, errors, locks, sessions and maintenance activity.

Free Research-based review
Last verified November 2026. Version checked: 13.3. Features and pricing for commercial products change; check the vendor site for the latest details.
Vendor
Gilles Darold (open source project)
Price
Free
Platforms
Self-hosted (any system with Perl; Linux, macOS, Windows)
Licence
PostgreSQL Licence
Works with
PostgreSQLAmazon RDS for PostgreSQLGoogle Cloud SQL for PostgreSQLPgBouncerAmazon Redshift

At a glance

Database enginesPostgreSQL (self-managed, RDS, Cloud SQL, CloudNativePG logs), PgBouncer, Redshift logs
DeploymentA Perl script run on any machine that can read the log files
Collection/agentsNo agent; reads PostgreSQL log files after the fact
AlertingNone
Query monitoringSlow and frequent query reports built from logged statements
LicensingPostgreSQL Licence
Short answer

pgBadger is the standard free way to get a workload report out of PostgreSQL logs: slowest and most frequent queries, errors, locks, temporary files, checkpoints and autovacuum. It analyses past logs rather than watching servers live, has no alerting, and its output is only as good as your logging settings.

How we know: This profile is research-based: licence, release history, requirements, log formats and report contents were checked against the official pgBadger GitHub repository, README and releases page on 7 November 2026. We have not run pgBadger against our own logs.

Overview

pgBadger is a PostgreSQL log analyser maintained by Gilles Darold and distributed under the PostgreSQL Licence. It is a single Perl script with no dependencies beyond a modern Perl distribution, plus optional modules for CSV log parsing (Text::CSV_XS) and JSON output (JSON::XS). Version 13.3 was released on 3 November 2026.

You point pgBadger at log files and it produces a report, HTML by default, with text, JSON and binary outputs also available. It reads stderr, syslog, csvlog and jsonlog formats, Amazon RDS and CloudWatch logs, PgBouncer logs, Heroku logplex and Redshift logs, and parses Cloud SQL and CloudNativePG logs through its jsonlog format. Useful reports need PostgreSQL logging configured for it, for example log_min_duration_statement and a suitable log_line_prefix.

Key features

  • Reports on the slowest queries, the most frequent queries and the queries with the most total time
  • Hourly charts for temporary files, checkpoints, autovacuum and autoanalyze, errors and cancelled queries
  • Breakdowns of locks, query types, sessions and connections, plus PgBouncer statistics
  • Incremental mode (-I) producing a report per day and a cumulative report per week
  • Parallel parsing of one large log file (-j) or several files at once (-J)
  • Auto-detection of stderr, syslog, csvlog and jsonlog, with RDS, CloudWatch, Redshift and logplex formats
  • Output as HTML, text, JSON or binary files for later aggregation

Pros and cons

Pros

  • Free, with nothing to keep running between reports
  • Very little to install: a single Perl script
  • Wide log format support, including RDS and CloudWatch logs
  • Incremental and parallel modes for large or continuous log volumes

Cons

  • Analyses past logs; no live monitoring or alerting
  • Report detail depends on logging settings, and logging every statement adds log volume
  • Parallel processing does not work with compressed files, CSV logs or on Windows
  • PostgreSQL only

Pricing

pgBadger is free and open source, distributed under the PostgreSQL Licence. There is no paid edition and no licence fee.

Pricing checked on the vendor's official page on 7 November 2026. Prices change; confirm before buying.

Who it is best for

PostgreSQL DBAs who want periodic workload, error and maintenance reports from logs without running a monitoring server.

Who should look elsewhere

Verdict

Our take

pgBadger remains a useful free tool for PostgreSQL: it turns raw logs into a readable report with almost no setup. It complements rather than replaces a live monitor, since it has no alerting and only sees what your logging settings capture.

Frequently asked questions

Is pgBadger free?

Yes. pgBadger is distributed under the PostgreSQL Licence and has no paid edition.

Can pgBadger read Amazon RDS logs?

Yes. The README says pgBadger can auto-detect RDS and CloudWatch PostgreSQL logs using its rds format.

Does pgBadger monitor PostgreSQL in real time?

No. It analyses log files that already exist. Incremental mode can run it on a schedule to build daily and weekly reports, but it does not alert.

Sources

Checked November 2026.

How we research reviews and what star ratings mean: our editorial method.

Compare your options

Browse the full tools directory or see the head to head comparisons.