Chapter 8

Using Heroku Postgres as a Data Store for Your Heroku Applications


  • Getting started with Heroku Postgres
  • Understanding continuous protection
  • Understanding automated health checks
  • Creating a higher-availability database architecture
  • Creating databases
  • Forking databases
  • Creating database followers
  • Managing databases
  • Monitoring databases
  • Choosing the right plan
  • Deleting databases
  • Backing up data
  • Importing data
  • Using advanced features
  • Creating a sample app


The code downloads for this chapter are found at on the Download Code tab. The code is in the Chapter 8 download and individually named according to the names throughout the chapter.

When creating a web-based app, you typically need some sort of persistent storage on the back end. This is especially important when developing on a platform like Heroku where dynos are ephemeral, and you cannot even rely on them to store session-based information between requests. Heroku provides a number of options for storing your data, including several data as a service (DaaS) providers that offer the advantage of not having to deal with hardware provisioning and database patching.

The most common approach is to use the built-in Postgres database service provided by Heroku. This database is durable and reliable, and leverages the highly popular PostgreSQL, which provides advanced features for enterprise data storage. Developers ...

Get Professional Heroku Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.