Supported postgresql versions

Is there somewhere a note, which postgresql db versions are supported?

Would be great to have something for each released discourse version - especially if a postgresql version is no longer supported.

Postgres is bundled in with the Docker container for Discourse, so this is generally hands-off. The Discourse team upgrades the Postgres version as new releases come out and they are properly tested. The most recent upgrade was to version 13. You can see the details of that upgrade here:

3 Likes

Well, not everyone is using the bundled postgres db.

The current install doc lists Postgres 10+ as the required version:

https://github.com/discourse/discourse/blob/master/docs/INSTALL.md

That said, the only officially supported setups are using Docker containers.

2 Likes

Yes, the versions of postgres which are “supported” (from a docker build perspective, not all “strongly supported”) are listed in the templates directory of discourse_docker

https://github.com/discourse/discourse_docker/tree/master/templates

Having said that, it is highly recommended to move to the latest version of postgres, currently version 13, as soon as you can.

However, if you are running Discourse on a host where you cannot run the latest version because of some local constraint in your organization; the discourse_docker templates directory is a good place to research.

4 Likes

Checking in three years later: The docker template still says PG_MAJOR=13, but there are new versions of PostgreSQL: 14 from 2021, 15 from 2022, and 16 from 2023.

So the recommendation is still to use version 13 (which will EOL in 2025) rather than the latest PostgreSQL 16 (which will EOL in 2028)?

Yes, exactly.

We have some sites running version 15 already, and should get to updating from 13 next year.

1 Like