-
-
Notifications
You must be signed in to change notification settings - Fork 16
Upgrade Postgres Major Version #76
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
base: master
Are you sure you want to change the base?
Conversation
IRC log: after some discussions we decided that a separate container with pg17 would be nice, that the user can enable at will instead of being forced into it:
|
I did some experiments with integration docker-pgautoupgrade directly into our postgres container: https://github.com/rc9000/netdisco-docker/tree/pg17 It works, but it has some major downsides:
So currently I think the original approach of this PR might be better. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR upgrades PostgreSQL from version 13 to 17 in the netdisco-docker container, introducing a breaking change that requires manual database migration for existing installations.
- Upgrades PostgreSQL base image from 13.4-alpine to 17.4-alpine
- Adds version check that prevents startup if existing data is not PostgreSQL 17
- Provides comprehensive upgrade documentation with automated migration instructions
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
netdisco-postgresql/Dockerfile | Updates base image to PostgreSQL 17.4-alpine and adds su-exec package |
netdisco-postgresql/netdisco-db-entrypoint.sh | Adds version check that exits with upgrade instructions if not PostgreSQL 17 |
netdisco-postgresql/README_UPGRADE.md | New comprehensive upgrade guide with backup and migration procedures |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
TL;DR: do not just merge this right now :)
I did some digging how to navigate an upgrade of the Postgres version, as 13 will be out of support next year. Unfortunately this is a bit of a support headache, since it needs manual converting of the Postgres files. I tried to include an easy one-command approach using the pgautoupgrade project: https://github.com/pgautoupgrade/docker-pgautoupgrade
How to use it is in the README_UPGRADE.md, which the PG 17 container also just dumps into the container log if there is a mismatch.
However most users probably start the container in the background, in Docker Desktop etc. and will still not immediately see it. So we should find a good time to create a new release in Netdisco proper, declare this the cutoff for netdisco-docker PG13, and then I'd hang out in the issues & IRC for a week or two, because people will probably need help :)
To try the instructions or just test Netdisco with PG17 in general, you can get the new container from my Dockerhub account - just use
rc9000/netdisco:latest-pg17
as a drop-in replacement fornetdisco:latest-postgresql
.Actual EOL for PG13 is November 13, 2025 so there is no rush.