How hard is it to downgrade a premium Postgres tier to standard?
Does it just require that I create a standard tier as a follower and then swap once the follower is caught up?
Or, ideally, is there an easier (single push-button) way to convert a premium tier to a standard tier (or vice versa)?
You can manage your add-ons either through the CLI or the Heroku Dashboard web interface. To downgrade an add-on using the CLI: heroku addons:downgrade newrelic:wayne Downgrading to newrelic:wayne on myapp... done, v27 (free) Use `heroku addons:docs newrelic:wayne` to view documentation.
If no --version flag is set, the upgrade will default to 14. Performing a pg:upgrade requires app downtime on the order of 30 minutes.
pg:reset. The PostgreSQL user your database is assigned doesn't have permission to create or drop databases. To drop and recreate your database use pg:reset .
Yes Mike Curtiss, is easier but follow part of the same steps, the quick how to is:
# 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, I just need to make WHITE the active database
heroku 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/
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>
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With