-
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
base: main
Are you sure you want to change the base?
Conversation
|
Just to offer a bit of background on this change, I had originally deployed mattermost in my environment using the old postgres version listed here, but eventually wanted to upgrade to stay ahead in the postgres release cycle. Upgrading postgres is a bit of a pain, but the changes introduced in version 18 of the upstream docker image will make that much easier going forward.
I figured I'd contribute that back to the community so that future upgrades are either for all. Thanks for the awesome platform, I've been really enjoying mattermost! |
|
This PR has been automatically labelled "stale" because it hasn't had recent activity. |
|
Not stale -- just waiting for review from a maintainer :-) /cc @amyblais |
This revision bumps postgres from version 14 to the latest supported release, version 18. In version 18, the format of the persistent storage volume changed to improve ease of database upgrades. To accomodate this, the volume mounts for the postgres service in docker compose was adjusted. Refer to the upstream documentation for more details. Additionally, mattermost was upgraded to the latest patch release 10.11.7 which includes some low- to medium-severity security fixes.
9aff9c4 to
79d47d2
Compare
NARSimoes
left a comment
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.
Thank you for submitting the change. I just have a minor comment for clarification, but otherwise looks good.
| ## user to connect to the database. | ||
| ## A guide on how to change the database user to a nonsuperuser can be found in docs/creation-of-nonsuperuser.md | ||
| POSTGRES_IMAGE_TAG=14-alpine | ||
| POSTGRES_IMAGE_TAG=18-alpine |
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.yml file needs be modified to accommodate the POSTGRES_DATA_PATH change (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.
|
This PR has been automatically labelled "stale" because it hasn't had recent activity. |
|
Still active, just awaiting review. |
Summary
This revision bumps postgres from version 14 to the latest supported release, version 18. In version 18, the format of the persistent storage volume changed to improve ease of database upgrades. To accomodate this, the volume mounts for the postgres service in docker compose was adjusted. Refer to the upstream documentation for more details.
Additionally, mattermost was upgraded to the latest patch release 10.11.7 which includes some low- to medium-severity security fixes.
I've tested this in my personal environment for a few weeks, works well :-)
Ticket Link
None.