Scale Postgres VMs

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.

See Monitoring for how to check the current sizes of the VMs in your Postgres cluster.

Scale VM resources for each Machine in the cluster with the flyctl machine update command. Here's an example of scaling RAM to 1GB on a machine:

fly machine update e784079b449483 --memory 1024 --app pg-test

You can use fly machine status again to confirm the new scale of the Machine.

HA Clusters

If you have more than one instance in the primary region cluster, scale these VMs identically; they are meant to be interchangeable so the cluster can fail over in case of trouble.

Postgres Resource Parameters

When you created your Fly Postgres cluster, certain Postgres configuration parameters were set to sensible values for the resources being provisioned. This means you may want, or need, to change them if you scale your VM resources. Read Configuration Tuning before scaling down!