-
Notifications
You must be signed in to change notification settings - Fork 264
chore(deps): upgrade to postgres 18 and latest mattermost patch release #178
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
Open
brandon1024
wants to merge
1
commit into
mattermost:main
Choose a base branch
from
brandon1024:postgres-upgrade
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
With the update to pg 18, the
docker-compose.ymlfile needs be modified to accommodate thePOSTGRES_DATA_PATHchange (which is done). Should we add a note here (or elsewhere) to inform and warn users who may be still using previous versions ? Asking @hanzei for advice.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.
Correct yeah, anyone using the postgres image prior to version 17 will need to adjust their volume mounts. Folks on older postgres versions looking to upgrade will have to refer to the upstream guide, since db upgrades are not automatic nor trivial.
Adding a note here doesn't hurt though.
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.
For reference, the related PR is docker-library/postgres#1259.
For anyone upgrading from an older version, the change in PGDATA requires a manual migration. That is a major trap. Given that pg 18 is just out for 3 months, I'm leaning towards only upgrading to v17 and kicking that can down the road.
v17 is already quite new for pg standards.
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.
I see what you’re saying, and I don’t totally disagree, but a postgres upgrade is manual no matter how you look at it. Even if you’re migrating from 16 to 17, you’ll need to dump the database, spin up a fresh instance and then import. There are fancier ways of course, but the process is always the same. At least with 18, future upgrades are much easier to carry out.
If a user happened to bump the version to 18 without changing the mount points, it’s not catastrophic. It’ll just spin up a fresh database in another directory. But that’s besides the point, this change here mainly benefits the users starting with a fresh deployment of mm, making it easier to perform upgrades later on. Anyone looking to upgrade should always refer to the mm documentation.
I don’t know, Postgres is historically very stable, and they have already released their second minor release. No issues in my environment for a few months now.
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.
Fair points 👍 I would love to see a short documentation on how to update the postgres container on https://docs.mattermost.com/deployment-guide/server/deploy-containers.html. @mrckndt I remember you working with a customer on a DB upgrade. Would you mind writing a short guide for our docs?
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.
I'm happy to collaborate on some documentation too, just let me know! 🙂
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.
Our docs are open source and available at https://github.com/mattermost/docs/. I would highly appreciate if you submit a PR @brandon1024 🎉