Skip to content
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

PG16 Support #233

Merged
merged 7 commits into from
Jul 29, 2024
Merged

PG16 Support #233

merged 7 commits into from
Jul 29, 2024

Conversation

davissp14
Copy link
Contributor

@davissp14 davissp14 commented Jul 6, 2024

Postgres 16 requires repmgr 5.4.1, which relies on glibc >= 2.38. This glibc version has not yet reached Debian stable, so in an effort to get PG 16 out we are switching to an ubuntu noble 24.04. Since this change would lead to collation issues with existing setups, we are just going to just maintain separate Dockerfiles per major PG version.

While basic provisioning seems to work fine, some additional testing will be needed.

@davissp14 davissp14 marked this pull request as ready for review July 6, 2024 21:40
@davissp14 davissp14 changed the title Allow PG16 to be built with its own dockerfile PG16 Support Jul 6, 2024


# TimescaleDB and PostGIS
RUN echo "deb https://packagecloud.io/timescale/timescaledb/ubuntu/ jammy main" > /etc/apt/sources.list.d/timescaledb.list \
Copy link
Contributor Author

@davissp14 davissp14 Jul 6, 2024

Choose a reason for hiding this comment

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

Timescale isn't compatible with noble yet... While jammy seems to work, some additional testing is needed.

Related:
timescale/timescaledb-toolkit#799

postgresql-contrib-${PG_MAJOR_VERSION}

# Repmgr
RUN curl -L http://launchpadlibrarian.net/722514158/postgresql-${PG_MAJOR_VERSION}-repmgr_${REPMGR_VERSION}_amd64.deb -o postgresql-${PG_MAJOR_VERSION}-repmgr_${REPMGR_VERSION}_amd64.deb && \
Copy link

@owenthereal owenthereal Jul 8, 2024

Choose a reason for hiding this comment

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

Could this also cover arm64? This is mainly for building an image on Mac for local testing 🙏

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How are you testing locally?

Choose a reason for hiding this comment

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

I'm testing the building of the image.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you're just testing the build process you can specify the platform.

E.G.
docker build . --platform linux/amd64

@ndarilek
Copy link
Contributor

Ran the following successful tests with this image:

  • Provisioned with fly pg create ... --enable-backups
  • Created 2 test tables, backing up between each
  • Restored both backups by ID into new instances with fly pg backup restore, note that you'll need the unreleased --image-ref flag to ensure the restore image runs Postgres 16. Both restores had their expected contents.
  • Connected locally using psycopg2 to ensure authentication works, running a query to list database tables

Please let me know if I should test anything else.

@davissp14
Copy link
Contributor Author

Nice! We'd just need to test out the various flyctl commands and then do the same with timescaledb.

@ndarilek
Copy link
Contributor

We'd just need to test out the various flyctl commands

FWIW all these tests were run with flyctl commands. Were there any I missed?

All of the above tests were successfully run with timescaledb too, no issues.

@davissp14 davissp14 merged commit d8ec52d into master Jul 29, 2024
6 checks passed
@davissp14 davissp14 deleted the pg-16-support branch July 29, 2024 15:10
This pull request was closed.
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.

3 participants