postgresql icon indicating copy to clipboard operation
postgresql copied to clipboard

How to upgrade postgres with the playbook?

Open thbar opened this issue 9 years ago • 2 comments

I've recently used this playbook to install postgres 9.5 for a simple deployment (mono-instance, low scale), kudos for the great work!

9.6 support is soon to be merged. I searched tips on how to handle such an upgrade using the playbook, and thought I'd write down what I found, in hope we can maybe create a readme section (at least for simple cases).

I found the following useful elements :

  • postgresql_service_enabled could I guess be used to switch off the database while at 9.5.
  • issue #101 seems to hint that 2 versions will be installed at once on the same port by default
  • for simple deployments, an automated call to pg_upgrade could do the trick

I suppose we could have an postgresql_run_pg_upgrade type of variable, which could enforce the shutdown of the database, then the run of pg_upgrade etc.

If anyone already conducted such an upgrade in a semi or full automated fashion, please share more bits so we can group these in a readme section. Thanks!

thbar avatar Dec 19 '16 07:12 thbar

nice initiative 👍 once upgrading from 9.5 to 9.6 gets a priority for my team, happy to contribute, including making it work for (docker)containerized postgres deployments, that we added in https://github.com/ANXS/postgresql/pull/213 (hopefully getting merged at some point)

lhoss avatar Mar 14 '17 09:03 lhoss