Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Upgrade Postgres #4440

Closed
chadwhitacre opened this issue May 3, 2017 · 9 comments
Closed

Upgrade Postgres #4440

chadwhitacre opened this issue May 3, 2017 · 9 comments

Comments

@chadwhitacre
Copy link
Contributor

We are currently on 9.3 in production, and I'd like to use UPSERT from 9.5 over in #4438.

Upgrade docs: https://devcenter.heroku.com/articles/upgrading-heroku-postgres-databases

@chadwhitacre
Copy link
Contributor Author

Backup started.

@chadwhitacre
Copy link
Contributor Author

@chadwhitacre
Copy link
Contributor Author

Alright, db provisioned. Remaining procedure is:

  • heroku maintenance:on
  • heroku pg:copy DATABASE_URL HEROKU_POSTGRESQL_ORANGE_URL
  • heroku pg:promote HEROKU_POSTGRESQL_ORANGE_URL
  • heroku maintenance:off

@chadwhitacre
Copy link
Contributor Author

Maintenance on and copy initiated. Should take about seven minutes.

Also: https://twitter.com/Gratipay/status/859810822658379776.

@chadwhitacre
Copy link
Contributor Author

Or not! Done copying, proceeding ...

@chadwhitacre
Copy link
Contributor Author

[gratipay] $ heroku maintenance:on
Enabling maintenance mode for ⬢ gratipay... done
[gratipay] $ heroku pg:copy DATABASE_URL HEROKU_POSTGRESQL_ORANGE_URL
 ▸    WARNING: Destructive action
 ▸    This command will remove all data from ORANGE
 ▸    Data from MAROON will then be transferred to ORANGE
 ▸    To proceed, type gratipay or re-run this command with --confirm
 ▸    gratipay

> gratipay
Starting copy of MAROON to ORANGE... done
Copying... done
[gratipay] $ heroku pg:promote HEROKU_POSTGRESQL_ORANGE_URL
Ensuring an alternate alias for existing DATABASE_URL... done
Promoting postgresql-octagonal-73752 to DATABASE_URL on ⬢ gratipay... done
[gratipay] $ heroku maintenance:off
Disabling maintenance mode for ⬢ gratipay... done
[gratipay] $ 

screen shot 2017-05-03 at 12 46 51 pm

@chadwhitacre
Copy link
Contributor Author

App looks okay.

Interesting that we dropped from 2.3 GB to 495 MB. I guess we should be VACUUMing or something?

@chadwhitacre
Copy link
Contributor Author

Confirmed 9.6.2. 👍

[gratipay] $ heroku pg:psql
--> Connecting to postgresql-octagonal-73752
Null display is "¤".
Line style is unicode.
Border style is 2.
psql (9.4.5, server 9.6.2)
WARNING: psql major version 9.4, server major version 9.6.
         Some psql features might not work.
SSL connection (protocol: TLSv1, cipher: DHE-RSA-AES256-SHA, bits: 256, compression: off)
Type "help" for help.

gratipay::DATABASE=>

@chadwhitacre
Copy link
Contributor Author

Old db removed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant