PostgreSQL 9.4 General Availability

We’re pleased to announce PostgreSQL 9.4 in general availability for Heroku Postgres. After announcing the beta earlier this year, we’ve had many developers provision databases against this new version. Throughout the beta period, developers raved about the new data type along with the performance enhancements to materialized views. This uptake by early adopters demonstrates an interest in everything that the new version of PostgreSQL provides, from features to performance.

New Features and Performance Updates

One of the most notable new features of 9.4 is the JSONB data type. While the text-based JSON data type has existed in PostgreSQL for some time, JSONB is a binary storage format that brings many performance gains along with the support for indexes. What’s exciting about this feature is that you now have the reliability and durability of a relational database mixed with the flexibility of a document-oriented database.

On the performance side, materialized views have been upgraded to allow for updates in the background. Prior to PostgreSQL 9.4, when a materialized view was updated, an exclusive lock was created against the materialized view, which meant that any subsequent query that used the view was blocked until the update finished. With this release of Postgres, materialized views can be updated concurrently. This means that queries that read from the materialized view can continue to run while the update happens in the background, which results in faster, up-to-date reporting.

Getting Started

Starting today, when you provision a new Heroku Postgres database, 9.4 will be the default. This means that you’ll get the benefits of concurrent materialized views, the new JSONB data type as well as all the latest in terms of performance, stability, and functionality. If you haven’t upgraded your current databases, we encourage you to do so. As with any new release, we’d love to hear about how you’re using it at postgres@heroku.com.

Browse the blog archives, subscribe to the full-text feed, or visit the engineering blog.