mattermost-docker icon indicating copy to clipboard operation
mattermost-docker copied to clipboard

Plans to upgrade postgres database

Open tejasbubane opened this issue 7 years ago • 6 comments

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?

tejasbubane avatar May 18 '17 14:05 tejasbubane

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.

pichouk avatar May 18 '17 14:05 pichouk

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.

xcompass avatar Jun 08 '17 17:06 xcompass

good decision https://github.com/tianon/docker-postgres-upgrade

andruwa13 avatar Dec 03 '17 00:12 andruwa13

This one is quite simple: https://github.com/docker-library/postgres/issues/37#issuecomment-180615524

J0WI avatar Feb 01 '19 14:02 J0WI

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.

pichouk avatar Feb 03 '19 21:02 pichouk

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?

philipkozeny avatar May 14 '20 15:05 philipkozeny