Can I use a later version of Postgres than Discourse?

AI-generated summary

The discussion revolves around using a later version of Postgres with Discourse. Wanderer is running Postgres 14 in a separate container and experiencing issues with automatic backup due to pg_dump version incompatibility. Falco and Falco suggest that when using a different Postgres version, backup handling must be managed separately. pfaffman proposes installing the PG 14 client tools inside the Discourse container or using a two-container installation, but Wanderer notes that they already have a two-container setup and the issue lies specifically with pg_dump during automatic backup.

Hello, I have a separate Postgres db container, because I’ve noticed some quite severe problem stopping and starting Discourse container, and because I prefer to have db apart from Discourse program.

As stated here, “Discourse requires PostgreSQL 13 or later”, so I pulled the last version that is 14; no problem using it but I noticed an error during automatic backup, caused by pg_dump version.

Any hint?

Thanks

If you are running a later version of PostgreSQL than the one we ship you will need to handle the backup too.

I think that it’s also possible to install the PG 14 client stuff inside your container so that the backup tools will work.

Another solution is a two container installation. See How to move from standalone container to separate web and data containers fo rsome information.

Not sure it’s very related to my question. I already have two containers installation, working fine, Discourse in a container, Postgres 14 in another. The only thing not working, afaik, is pg_dump, that for some reason refuses to go during automatic Discourse backup.

I don’t know if it’s a Discourse or Postgres problem, but I find strange that everything is working except a single command.

Our base image ships with both pg client tools and server on the same major version. Since you are running a different image for PostgreSQL, and it has a different major version, you will need to handle the backup.