Is it possible to shrink a volume? I have one that is much to large for my needs (was created by fly pg automatically) and not sure my best approach to get it down a bit.
Seeing that persistent storage is billed per GB, I’m assuming the lowest you can go is 1G
, when creating with fly pg create
and answering with 1G
in the volume size prompt.
It defaults to 10G
, as seen in the source code.
I found an old comment (Dec '20) that says resizing wasn’t possible then.
So perhaps:
- snapshot of your current pg
- pg create with
1G
, restoring from snapshot (Multi-region PostgreSQL)
Requires a bit of trial and error, if that’s doable.
Is this a volume for a replica? You can create a smaller volume, then add a Postgres VM and let it replicate.
There’s no current way to shrink a volume. We have a lot of storage features that are basically “second most important” on the infrastructure roadmap (meaning, work we’ll start after the next round of hiring). Resizing volumes is one of them.
Hello Kurt
I have a db cluster, 2 VMs with 40GB volumes each. Needless to say, this is way too much. I want to downsize to 1GB each. Would you be able to provide me with step-by-step directions to do this?
Also, I have another app with 1 VM, but I need to have a replicate running just in case the original fails, would you be able to guide me for this as well?
I appreciate any support you may provide.
Regards,
Bashar