What version of Postgres is installed by default?

Is there a way to find out which version is currently running?

I updated the app to add some services but I think I broke it by using the wrong PG version.

Edit:

Ok it’s 13.

Would be great if it was displayed somewhere during installation or when using fly info!

1 Like

@pier I just recently bumped the default version to 14.1. You can see what version you’re running via fly image show.

2 Likes

Thanks for the heads up!

Is there a way to install a specific version of postgres for the fly postgres cluster? for example 13?

@moissela Yep, you can specify a specific image at provision time.

Postgres now has two different configurations options available, so you will need to be conscious about the setup you’re planning to use ahead of time.

  1. Development single-node configuration:
    fly pg create --image-ref flyio/postgres-standalone:13.

  2. Production-ready HA configuration:
    fly pg create --image-ref flyio/postgres:13.

The UX for this process isn’t great, but hoping we can get this improved soon!

3 Likes

Thank you, this is exactly what I need.

I’ve asked here after looking at the flyctl cli help documentation for the postgres command and found nothing.

Now, thanks of your argument name hint, I’ve found that on the flyctl github repo this arg is configured as hidden.

I think it can be very helpful to show a simple description for this at the cli.

@moisela Just out of curiosity, is there a specific reason you’re opting for PG13 over PG14?

1 Like

Not a specific one: we’ve had some trouble migrating majority of our projects from pg12 to pg13 recently.

This task takes us some time that we need to plan so we can handle correctly and with the right level of attention.

So we need to know that we can start a new postgres instance on Fly with the version (at least the major one) we need in that moment and not be forced with a newly version.

Maybe when we’ll migrate to the Fly platform will also be an opportunity to adopt pg14 :wink:

1 Like

So we need to know that we can start a new postgres instance on Fly with the version (at least the major one) we need in that moment and not be forced with a newly version.

Understood! Thanks!

--image-ref is not listed in the --help output for flyctl, and trying it blind did not work at all (still make a pg14 for me)

Aha! The --image-ref switch does not work if you specify vm size or volume size switches, or if you use the wizard to pick “custom configuration” instead of one from the list. Looks like I have 13 now