Postgres Log Monitoring 101: Deadlocks, Checkpoint Tuning & Blocked Queries

12 February, 2018

Those of us who operate production PostgreSQL databases have many jobs to do - and often there isn't enough time to take a regular look at the Postgres log files. However, often times those logs contain critical details on how new application code is affecting the database due to locking issues, or how certain configuration parameters cause the database to produce I/O spikes. This post highlights three common performance problems you can find by looking at, and automatically filtering your…

Continue reading

Visualizing & Tuning Postgres Autovacuum

28 November, 2017

In this post we'll take a deep dive into one of the mysteries of PostgreSQL: VACUUM and autovacuum. The Postgres autovacuum logic can be tricky to understand and tune - it has many moving parts, and is hard to understand, in particular for application developers who don't spend all day looking at database documentation. But luckily there are recent improvements in Postgres, in particular the addition of pg _ stat _ progress _ vacuum in Postgres 9.6, that make understanding autovacuum and…

Continue reading

Whats New in Postgres 10: Monitoring Improvements

04 October, 2017

Postgres 10 has been stamped on Monday, and will most likely be released this week, so this seems like a good time to review what this new release brings in terms of Monitoring functionality built into the database. In this post you'll see a few things that we find exciting about the new release, as well as some tips on what to adjust, whether you use a hosted Postgres monitoring tool like pganalyze, or if you've written your own scripts. New "pg_monitor" Monitoring Role Most users of Postgres…

Continue reading

Introducing Log Insights: Realtime Analysis of Postgres Logs

07 June, 2017

After significant development effort, we're excited to introduce you to a new part of pganalyze that we believe every production Postgres database needs: pganalyze Log Insights In the past you used generic log management systems and setup your own filtering and altering rules, which required a lot of manual effort, as well as knowledge of all potential issues that might happen in your Postgres database. pganalyze Log Insights aims to do better than this. It's the easiest, out of the box method…

Continue reading

Monitoring PostgreSQL 9.5 & Improved Weekly Reports

06 July, 2015

Last week the first official alpha version of PostgreSQL 9.5 was released . Whilst the stable release is still 2-3 months away, now is a good time to review what is upcoming, and which changes and improvements we can expect. Here is an overview of the most important changes for monitoring tools: pg _ stat _ statements gets new columns min _ time, max _ time, mean _ time & stddev _ time - making it much easier to identify outliers in the query statistics New pg _ stat _ ssl view that shows…

Continue reading

Introducing pg_query: Parse PostgreSQL queries in Ruby

17 June, 2014

In this article we'll take a look at the new pg_query Ruby library. pg_query is a Ruby library I wrote to help you parse SQL queries and work with the PostgreSQL parse tree. We use this extension inside pganalyze to provide contextual information for each query and find columns which might need an index. At the end of this article you'll also find monitor.rb - a ready-to-use example that filters pg _ stat _ statements output and restricts it to only show a specific table. Existing…

Continue reading

Announcing The All-New Database Check-Up

20 March, 2014

We’ve just launched our new version of Database Check-Up - allowing you to see more quickly what could be relevant to look at in your database. In addition we’ve also revamped the detail pages of queries, tables, indices and config settings to match the new style: Improved Check-Up: Config Settings When working with other people's PostgreSQL databases, we’ve seen a lot of things, from fsync=off (which you really only want if you don’t care about your data or have no writes) to simple…

Continue reading