Follower databases can be used to create redundancy, scaling, or upgrading your existing database. Once a follower is set up, all data written to the primary database will be synced over to the follower. In this recipe, you will learn how to quickly get a follower set up and synced with your primary database.
Note
Primary/follower databases are also commonly referred to as master/slave. On Heroku and in this book, we'll be using the terms primary and follower.
We'll be setting up our follower database using the Heroku dashboard.
Note
Followers can only be created for Standard or Premium databases. We'll need to upgrade if we are using a development or hobby-level database. To see if followers are available on our database, we can run $ heroku pg
.
We will perform the following steps:
Let's open a browser and go to https://postgres.heroku.com/databases and click on our application's primary database.
Next, we'll click on the gear icon in the top-right corner...