Downgrade Heroku premium PostgreSQL tier to standard? Downgrade Heroku premium PostgreSQL tier to standard? heroku heroku

Downgrade Heroku premium PostgreSQL tier to standard?


Yes Mike Curtiss, is easier but follow part of the same steps, the quick how to is:

# first, list your databasesheroku pg -a <your-app-name># In my case, my current database is named PUCE and my old database is named WHITE, I want to copy the data from PUCE to WHITEheroku pg:copy HEROKU_POSTGRESQL_PUCE_URL HEROKU_POSTGRESQL_WHITE_URL -a <your-app-name># now, I just need to make WHITE the active databaseheroku pg:promote HEROKU_POSTGRESQL_WHITE_URL -a <your-app-name>

Thats it. Then I remove the PUCE from the resources panel.

Oh, you need to have heroku toolbelt installed to run those commands. Install it from here https://toolbelt.heroku.com/


Two ways to Downgrade Heroku premium PostgreSQL tier to standard or Upgrade

  • first, list your databases

    heroku pg -a < your app name >

In my case, my current database is named PUCE and my old database is named WHITE, I want to copy the data from PUCE to WHITE

heroku pg:copy HEROKU_POSTGRESQL_PUCE_URL HEROKU_POSTGRESQL_WHITE_URL -a <your-app-name>

now, Unfollow PUCE

heroku pg:unfollow HEROKU_POSTGRESQL_PUCE_URL -a <your-app-name>

now, Just pramote the databse

heroku pg:promote HEROKU_POSTGRESQL_WHITE_URL -a <your-app-name>

I have also restart dynos by heroku ps:restart -a <your-app-name>

  • Second Way

Create a new follower for your database and wait for the follower to catch up to the primary database:

heroku addons:create heroku-postgresql:standard-2 --follow HEROKU_POSTGRESQL_PUCE_URL -a <your-app-name>

Follower will become available for read-only queries when up-to-date Use heroku pg:wait to track status

heroku pg:wait -a <your-app-name>

heroku pg:info -a <your-app-name>

Following: HEROKU_POSTGRESQL_PUCE (DATABASE_URL) Behind By: 125 commits

heroku maintenance:on -a <your-app-name>

heroku pg:info -a <your-app-name>

Following: HEROKU_POSTGRESQL_PUCE_URL (DATABASE_URL) Behind By: 0 commits Check again pg info if it shoes behind by 0 than you can process below >query

heroku pg:unfollow HEROKU_POSTGRESQL_WHITE_URL -a <your-app-name>heroku pg:promote HEROKU_POSTGRESQL_WHITE -a <your-app-name>

Promoting HEROKU_POSTGRESQL_WHITE_URL to DATABASE_URL... done

heroku maintenance:off -a <your-app-name>

refrence


There is no push-button way to downgrade. I asked Heroku tech support about the question, and they said downgrading follows the exact same process as upgrading (i.e. creating a follower tier and then switching over).