Skip to content

Add Postgres 17/TimescaleDB images #266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Conversation

cedws
Copy link

@cedws cedws commented Jan 13, 2025

Closes #263. This adds Postgres 17 and Postgres 17 with TimescaleDB images.

The timescaledb-toolkit package has intentionally been omitted from the new TimescaleDB image due to clarity needed around licensing. See #265 for info.

Both images have been tested with 2 replicas in Fly.io and pass health checks.

@davissp14
Copy link
Contributor

Thanks for this! I'll try and take a look at this today.

@davissp14
Copy link
Contributor

I didn't forget about this, trying to get a change in before we move forward with this.

Copy link
Contributor

@davissp14 davissp14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will need to make a few small changes to make it compatible with my recent changes to main. Sorry about that.

@r38y
Copy link

r38y commented Feb 4, 2025

Hiya, any ETA on merging this? 😁

@punkpeye
Copy link

punkpeye commented Feb 8, 2025

@davissp14 Would greatly appreciate for this to be merged.

@davissp14
Copy link
Contributor

If someone is able to address the requested changes, it could help speed things up.

@punkpeye
Copy link

I don't think anyone but you or the original author are able to contribute here.

These changes are so minor (just version changes?) that it would be the easiest for you to pull it and amend as part of the merge routine.

@davissp14
Copy link
Contributor

New major releases just need to be thoroughly tested before we roll it out as they’ll become the default for new PG provisions.

I’m mostly chipping in during my very limited spare time, so any extra help from the community can really help speed things up. I've been swamped, but i'll see if I can carve out some time this week to help get this over the finish line.

@r38y
Copy link

r38y commented Feb 10, 2025

It looks like @cedws resolved the comments on the review. Do you just need someone to test it? What's the best way to do that?

@davissp14
Copy link
Contributor

Yeah, there wasn't a new "request to review" so I missed it. 😅

Sorry, I wasn't clear in my previous comment. For this kind of thing, having the PR in a spot where I can take it and do the required testing is more than enough!

Appreciate your help!

@cedws
Copy link
Author

cedws commented Feb 10, 2025

That's my bad, I didn't press the button. Thanks.

@r38y
Copy link

r38y commented Feb 10, 2025

Welp, my job here is done.

/me dusts his hands off; goes to lunch for the rest of the day

@bcomnes
Copy link

bcomnes commented Feb 10, 2025

Is the plan to continue the original fly pg along side the coming soon managed service? Or is it getting wound down to more of a community supported project?

@davissp14
Copy link
Contributor

Is the plan to continue the original fly pg along side the coming soon managed service? Or is it getting wound down to more of a community supported project?

I suspect the latter, but time will tell.

@punkpeye
Copy link

Question, if I just take this Docker image, build it, and upload to Docker hub, can I deploy it as a fly pg instance?

https://github.com/fly-apps/postgres-flex/pull/266/files#diff-80e617f45dbde7e7b00dbf8fc1dbf232debca24a086294cb58f0d55825462003

@cedws
Copy link
Author

cedws commented Feb 11, 2025

Question, if I just take this Docker image, build it, and upload to Docker hub, can I deploy it as a fly pg instance?

https://github.com/fly-apps/postgres-flex/pull/266/files#diff-80e617f45dbde7e7b00dbf8fc1dbf232debca24a086294cb58f0d55825462003

If you do fly pg create --image-ref and pass the image you have built yes. That's how I tested it.

If you don't want to host it on Docker Hub, you can create an empty Fly app just to hold the image in the registry, and reference the image when running fly pg create.

@davissp14
Copy link
Contributor

davissp14 commented Feb 11, 2025

I should be able to get to this today, but yes, that is correct.

# Build the docker image
docker build . -f pg17/Dockerfile -t <docker-username>/postgres-flex:17.2 --platform linux/amd64

# Push the image
docker push <docker-username>/postgres-flex:17.2

# Reference the image
fly pg create --name <pg-app-name> --image-ref  <docker-username>/postgres-flex:17.2

@punkpeye
Copy link

I still need to add a json schema extension. so it seems I need to fork anyway, right?

@punkpeye
Copy link

Unless we could add it to this image. Not sure what the rules around what extensions go into the base image.

@davissp14
Copy link
Contributor

davissp14 commented Feb 11, 2025

@punkpeye Which extension specifically?

The main issue with third-party extensions is that compatibility with new major versions can sometimes take awhile. It either ends up blocking major version releases, or it ends up creating a documentation issue.

@punkpeye
Copy link

The one that's maintained by supabase https://github.com/supabase/pg_jsonschema

It is super useful when storing JSON inside pg.

Just last week it would have saved me from accidentally lots of corrupted data.

@davissp14 davissp14 mentioned this pull request Feb 13, 2025
@davissp14
Copy link
Contributor

Aight, PG 17.2 has been rolled out. Thanks for the help!

@davissp14 davissp14 closed this Feb 13, 2025
@punkpeye
Copy link

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Postgres 17
5 participants