how to change the postgres leader region?

There’s an environment variable you’ll need to change on the database.

To change that:

  1. Create an empty directory
  2. Run fly config save -a app-db
  3. Change the PRIMARY_REGION value in the generated fly.toml
  4. Run fly image show -a app-db, find the tag (like 14)
  5. Run fly deploy -i flyio/postgres:14
3 Likes