Heroku: Upgrading your database
Here's a process I've found for upgrading your database on Heroku.
There are many more commands and I highly suggest reviewing the Heroku Documentation.
First, check the status of your databse.
Set your app to maintenance mode.
Create a backup of your current database.
heroku pgbackups capture
Create a new instance of your database
heroku addons:add heroku-postgresql:standard-0
Check the progress on the new database you've provisioned.
Restore the database
heroku pgbackups:restore DATABASE_URL
Point to the new database by promoting it.
heroku pg:backups:promote DATABASE_URL
Re-instate the app by turning off maintenance mode.
Double check your work.
Measuring the Health of Your Database
There is a tool called PG Extras that can help you measure the health of your database and application. It can give you insight on things such as load time, database usage, long queries, etc. Here are a few commands I use regularly.
Install PG Extras
heroku plugins:install heroku-pg-extras
Number of processes running
Calculate the index sizes
Long Running Queries