How to upgrade a Postgres machine size on Apps V2?

I can’t figure out how the newer fly machine CLI works:

❯ fly apps list
NAME                            OWNER           STATUS          PLATFORM        LATEST DEPLOY
flxwebsites-db                  flx-websites    deployed        machines
fly-builder-bitter-feather-1279 flx-websites    suspended       machines


~/Code/flxwebsites main
❯ fly machine update flxwebsites-db -s dedicated-cpu-1x
Error could not get app: Could not find App



~/Code/flxwebsites main
❯ fly machine update -a flxwebsites-db -s dedicated-cpu-1x
Error: accepts 1 arg(s), received 0

I’m passing along the app name but it says “Could not find App”.

The list command works but update does not:

❯ fly machines list -a flxwebsites-db
1 machines have been retrieved.
View them in the UI here (​https://fly.io/apps/flxwebsites-db/machines/)

flxwebsites-db
ID              NAME                    STATE   REGION  IMAGE                           IP ADDRESS                      VOLUME                  CREATED                 LAST UPDATED
59185425a69836  summer-wildflower-1800  started ewr     flyio/postgres:14.4 (v0.0.32)   fdaa:0:db85:a7b:94:e946:63e3:2  vol_okgj545yog8vy2wz    2022-11-26T22:04:39Z    2022-11-26T22:04:52Z

❯ fly machines update -a flxwebsites-db -s dedicated-cpu-1x
Error: accepts 1 arg(s), received 0

Oy, OK, it’s fly machine update, not machines, but now I’m wondering why there are no dedicated CPUs available:

❯ fly machine update 59185425a69836 -a flxwebsites-db -s dedicated-cpu-1x
Error invalid machine size requested, 'dedicated-cpu-1x', available:
shared-cpu-1x
shared-cpu-2x
shared-cpu-4x
shared-cpu-8x

Ah okay I guess the pg machines only support shared CPUs.

2 Likes

BUT WHY :exploding_head:

This is pretty old thread but yeah I ended up spinning up my own Postgres instance so I could use dedicated processors.

I haven’t tested this quite yet but you can probably do this now with this new update to Postgres: Improved Postgres Clustering with repmgr - Preview - #2 by shaun

Fly has been working on a new system for Postgres called Flex that is based on Machines API. My guess is that this supports everything that Machines API does.

1 Like
Machines platform

NAME         	CPU CORES	MEMORY
shared-cpu-1x	1        	256 MB
shared-cpu-2x	2        	512 MB
shared-cpu-4x	4        	1 GB
shared-cpu-8x	8        	2 GB

NAME           	CPU CORES	MEMORY
performance-1x 	1        	2 GB
performance-2x 	2        	4 GB
performance-4x 	4        	8 GB
performance-8x 	8        	16 GB
performance-16x	16       	32 GB

Having same issues! Apps we’re installed when on v1, then upgraded and now need to scale to dedicated resource, but only the shared ones are available:

Error invalid machine size requested, 'performance-2x', available:
shared-cpu-1x
shared-cpu-2x
shared-cpu-4x
shared-cpu-8x

What command do I need to use to effortlessy scale the current machines without extra devops work and without any downtime.

Thanks