24th September 2020: PostgreSQL 13 Released!

pgBadger 4: Brand New Design, Time Period Exclusion and more !

Posted on 2013-10-31 by Dalibo

Paris, France - October 31th, 2013

DALIBO is proud to announce the release of pgBadger 4, a PostgreSQL performance analyzer, built for speed with fully detailed reports based on your Postgres log files.

This major version comes with a bunch of new features including a complete overhaul for the HTML reports, some new statistics, compatiblity with PostgreSQL 9.3 and Time Period Exclusion...

Better Reports / Improved user experience

With a full rewrite of its graphic design, pgBadger has now turned the HTML reports into a more intuitive user experience and professional look.

Every statistic report now include a key value section that shows you immediately some of the relevant informations. Pie charts have also been separated from their data tables using two tabs, one for the chart and the other one for the data.

Tables reporting hourly statistic have been moved to a multiple tabs report following the data. This is used with General (queries, connections, sessions), Checkpoints (buffer, files, warnings), Temporary file and Vacuums activities.

PostgreSQL 9.3 compatibility and new stats

Recent PostgreSQL versions add additional information about checkpoint, the number of synced files, the longest sync and the average of sync time per file. pgBadger collects and shows these informations in the Checkpoint Activity report.

There's also some new reports:

  • Prepared queries ratio (execute vs prepare)
  • Prepared over normal queries
  • Queries (select, insert, update, delete) per user/host/application
  • Pie charts for tables with the more tuples and pages removed during vacuum. The vacuum report will now highlight the costly table during a vacuum or analyze of a database.

The errors are now highlighted by a different color following the level. A LOG level will be green, HINT will be yellow, WARNING orange, ERROR red and FATAL dark red.

Some changes in the binary format are not backward compatible and option --client have been remove as it was replaced by --dbclient for a long time now.

Time Period Exclusion

If you are running a pg_dump or some batch process with very slow queries your report analyze will be annoyed by those queries taking too much place in the report. Before that release it was a pain to exclude those queries from the report. Now you can use the --exclude-time command line option to exclude all traces matching the given time regexp from the report. For example, let's say you have a pg_dump at 13:00 each day during half an hour, you can use pgbadger as follow:

pgbadger --exclude-time "2013-09-.* 13:.*" postgresql.log

If your are also running a pg_dump at night, let's say 22:00, you can write it as follow:

pgbadger --exclude-time '2013-09-\d+ 13:[0-3]' --exclude-time '2013-09-\d+ 22:[0-3]' postgresql.log

or more shortly:

pgbadger --exclude-time '2013-09-\d+ (13|22):[0-3]' postgresql.log

Exclude time always require the iso notation yyyy-mm-dd hh:mm:ss, even if log format is syslog. This is the same for all time related options. Take care that this option has a high cost on the parser performances.

Links & Credits

DALIBO would like to thank the developers who submitted patches and the users who reported bugs and feature requests, especially Keith Fiske, Marco Baringe, Herve Werner, Den Untevskiy and Mael Rimbault. The new HTML report was designed by Art Is Code.

pgBadger is an open project. Any contribution to build a better tool is welcome. You just have to send your ideas, features requests or patches using the GitHub tools or directly on our mailing list.

  • Download : http://dalibo.github.io/pgbadger/
  • Mailing List : https://listes.dalibo.com/cgi-bin/mailman/listinfo/pgbagder

About pgBadger:

pgBagder is a new generation log analyzer for PostgreSQL, created by Gilles Darold (also author of ora2pg, the powerful migration tool). pgBadger is a fast and easy tool to analyze your SQL traffic and create HTML5 reports with dynamics graphs. pgBadger is the perfect tool to understand the behavior of your PostgreSQL servers and identify which SQL queries need to be optimized.

Docs, Download & Demo at http://dalibo.github.io/pgbadger/


DALIBO is the leading PostgreSQL company in France, providing support, trainings and consulting to its customers since 2005. The company contributes to the PostgreSQL community in various ways, including : code, articles, translations, free conferences and workshops

Check out DALIBO's open source projects at http://dalibo.github.io