PostgreSQL version upgrade

Is there any way to upgrade the version of postgres on a managed cluster? Looking to bump up a major version from 12.5 to 13.4 for a couple DBs. Thanks!

@elliotdickison So you can use fly image update --app <app-name> to update your Postgres app to the latest available minor/patch version, but we currently do not support major version upgrades at this time.

If you are eager to move to the latest major version, I would recommend doing the following:

  1. Create a new Postgres app that’s running 13.4.
  2. Ensure you have Postgres 13 installed on your local machine.
  3. Issue a pg_dump against your current Postgres running 12.5.
    PostgreSQL: Documentation: 13: pg_dump
  4. Issue a pg_restore that targets your new Postgres running 13.4 and the dump file.
    PostgreSQL: Documentation: 13: pg_restore
    Something like this should work:
    pg_restore -v -d [FLY_POSTGRES_URI] < [path-to-dump-file] --no-owner

Hope that helps. Let me know if you have any questions!

1 Like

@elliotdickison I wrote this up yesterday if you’re interested in giving it a try:

1 Like

I love this, one of the best things about Fly is how flexible it is - what can’t you do with a Fly app? Will let you know if I get a chance to try it out.

1 Like