mattermost-docker
mattermost-docker copied to clipboard
Plans to upgrade postgres database
https://github.com/mattermost/mattermost-docker/commit/57d1d448b2a3aaea930a552d10e9ba6bd6888df3 says that we cannot directly upgrade the database to later versions since the directory was created using 9.4
.
Do we have any workarounds or plans for upgrading to latest versions?
Good question. Maybe try to use a startup script which get the actual data version and upgrade to the Dockerfile postgresql new version if needed.
Can use pg_upgrade
to do this.
I'm not sure how much manual operations needed for upgrade database with pg_upgrade
. Though, it seems for every major version upgrade, pg_upgrade
is needed for the compatibility. So I think a startup script using pg_upgrade
is a good idea along the way when we upgrade the db container.
good decision https://github.com/tianon/docker-postgres-upgrade
This one is quite simple: https://github.com/docker-library/postgres/issues/37#issuecomment-180615524
Yes but it is a one-shot command. A better solution could be to have a check at container startup which will automatically use pg_upgrade
to upgrade database if needed.
With the official deprecation announcement of supporting postgres 9.4 coming up (https://github.com/mattermost/docs/pull/3538/files), any plans how the upgrade is handled in that repo?