Upgrade Postgres

This document applies to Postgres clusters running on our next-gen Apps V2 architecture (Fly Machines). If you created your cluster using any flyctl version before v0.0.412, refer to Fly Postgres on Apps V1 and Multi-region PostgreSQL instead.

You can upgrade a Fly Postgres cluster across minor Postgres versions with fly image update. This updates your VMs to the latest release of the postgres-ha app

Check your current image with fly status:

fly status -a <postgres-app-name>

And upgrade with:

fly image update -a <postgres-app-name>

The update won't go ahead if the major Postgres version in your existing Postgres app does not match that in the newest postgres-ha release.

Upgrading Postgres across major versions is more complicated, and right now the way to do this is to provision a new cluster and restore a backup of your database data into it.