Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upgrade a postgres database from 9.3 to 9.4 on heroku?

This is a question for heroku staff. I have a database running postgres 9.3. When will heroku offer 9.4 that was released last week? Is there an upgrade guide? And is there a best practice way of converting json to jsonb columns with minimum downtime? Thanks!

like image 379
Homan Avatar asked Dec 23 '14 18:12

Homan


Video Answer


1 Answers

As told here, You can try out 9.4 by passing the --version=9.4 flag:

heroku addons:add heroku-postgresql:standard-0 --version=9.4

To upgrade your database:

  1. dump your data
  2. upgrade your postgresql heroku instance
  3. update your postgresql schema (json to jsonb...)
  4. reload your data

You could also try pg_upgrade.

As of 23rd of April 2015, postgresql 9.4 is available on Heroku.

like image 190
Jérôme Radix Avatar answered Oct 20 '22 15:10

Jérôme Radix