0

PostgreSQL 10.22 reaches End of Life on 2022-Nov-10. Due to security and operational concerns, Heroku cannot run unsupported software as a service. Therefore, the following database will need to be updated before 2022-Nov-10

So, this is not really an issue but I wanted to have a clearer picture. My current heroku postgres version is 10 which will deprecate and i would like to move to 11. The rails version is 5.2 and ruby is 2.6.7

I was suggested to use the pg_upgrade tool because my checksums are enabled as per the heroku documentation. It says to provision a follower, turn maintenance mode on and then hit pg upgrade. I am not sure how it will automatically select the next version or where to specify it?

The second option is from from this Stackoverflow verified article This works locally for me, but am not sure if I can use this on live server. I want to make sure there is no loss of data.

Can some please provide me the steps or the right article to get my postgres upgraded from 10 to 11 on Heroku.

James Z
  • 12,209
  • 10
  • 24
  • 44

1 Answers1

0

Turns out I was trying to add the version while creating an add on, where this should be done while using the pg_upgrade tool. Shared below are the steps i had to follow:

  • heroku addons:create heroku-postgresql:standard-0 --follow HEROKU_POSTGRESQL_PUCE_URL --app -app_name-production
  • heroku maintenance:on --app app_name-production
  • heroku pg:upgrade HEROKU_POSTGRESQL_CYAN --version 11 --app app_name-production
  • heroku pg:wait --app app_name-production
  • heroku pg:promote HEROKU_POSTGRESQL_CYAN --app app_name-production
  • heroku maintenance:off --app app_name-production