Skip to content
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

Upgrade zulip-postgresql container image based on postgres 14 #21211

Closed
varac opened this issue Feb 22, 2022 · 5 comments
Closed

Upgrade zulip-postgresql container image based on postgres 14 #21211

varac opened this issue Feb 22, 2022 · 5 comments

Comments

@varac
Copy link
Contributor

varac commented Feb 22, 2022

The PostgreSQL database details say:

We recommend that installations currently using older PostgreSQL releases upgrade to PostgreSQL 14, as we may drop support for older PostgreSQL in a future release.

But the current zulip-postgresql container image is still based on postgres 10.
Please provide a version based on postgres 14.

@alya
Copy link
Contributor

alya commented Feb 23, 2022

@alexmv You are probably aware of this, but tagging you just in case.

@zulipbot
Copy link
Member

Hello @zulip/server-production members, this issue was labeled with the "area: production" label, so you may want to check it out!

@alexmv
Copy link
Collaborator

alexmv commented Feb 24, 2022

I wasn't aware of it -- thanks for calling it out.

We don't have any build steps written down for how the zulip-postgresql container image was generated. My belief is that it's just adding the tsearchextras extension, which we can do with a very minor layer atop the official image.

I think the more complicated question, which I don't have an answer to off the top of my head, is how we manage the database upgrade path. We can't just drop in a new version of the postgresql container, since the data files would still be for postgresql 10.

We may need something like https://github.com/tianon/docker-postgres-upgrade to upgrade the data, and we'll need to document some manual steps to do so.

@andersk
Copy link
Member

andersk commented Feb 24, 2022

The zulip-postgresql container is built from Dockerfile-postgresql. The build instructions there are a bit of a lie: a mere docker build doesn’t suffice anymore because it’s a multi-architecture amd64+arm64 image now.

docker-zulip does at least use the zulip/zulip-postgresql:10 tag, so we could push a :14 tag without interfering with it. That doesn’t in itself solve the upgrade problem though, as you noted.

@alexmv
Copy link
Collaborator

alexmv commented Feb 24, 2022

Ugh, why is the postgresql container the one Dockerfile in zulip/zulip?

varac added a commit to varac/zulip that referenced this issue Feb 28, 2022
alexmv added a commit to varac/zulip that referenced this issue Apr 16, 2022
Because we have no upgrade path for the data in the PostgreSQL
databases themselves, this is pushed as, e.g.,
`zulip/zulip-postgresql:14` and *not* as
`zulip/zulip-postgresql:latest`.

Fixes: zulip#21211

Co-authored-by: Alex Vandiver <alexmv@zulip.com>
alexmv added a commit to varac/zulip that referenced this issue Apr 27, 2022
Because we have no upgrade path for the data in the PostgreSQL
databases themselves, this is pushed as, e.g.,
`zulip/zulip-postgresql:14` and *not* as
`zulip/zulip-postgresql:latest`.

Fixes: zulip#21211

Co-authored-by: Alex Vandiver <alexmv@zulip.com>
@alexmv alexmv closed this as completed in 9687df2 Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants