Skip to content

FEATURE: Add Postgres 18 template#1087

Merged
lightbulbjim merged 1 commit into
mainfrom
chrisr/pg18-template
Jul 14, 2026
Merged

FEATURE: Add Postgres 18 template#1087
lightbulbjim merged 1 commit into
mainfrom
chrisr/pg18-template

Conversation

@lightbulbjim

Copy link
Copy Markdown
Contributor

This allows bootstrapping new containers as well as upgrading old running containers to version 18. Note that upgrades have only been tested from version 15.

In the future Postgres 18 will become the default and upgrade documentation will be made available at that time.

This allows bootstrapping new containers as well as upgrading old running containers to version 18. Note that upgrades have only been tested from version 15.

In the future Postgres 18 will become the default.
@lightbulbjim
lightbulbjim marked this pull request as ready for review July 13, 2026 07:06
@pfaffman

Copy link
Copy Markdown
Contributor

This follows the same rebuild twice to upgrade flow as the last several postgres upgrades?

I'll update my scripts in a day or two and try it on a bunch of sites

@lightbulbjim

Copy link
Copy Markdown
Contributor Author

Yes, the same double rebuild workflow. Let us know if you encounter any problems.

There's no PG18 server in the base image yet so you'll need to make that change yourself for now. It will be added by the time PG18 becomes the default but for now we just need the template to consume internally.

@pfaffman

Copy link
Copy Markdown
Contributor

Oh! So we don't get have the double rebuild workflow, but if I want to upgrade my external postgres servers to 18, they'll work with the default web image.

Sorry I missed that

@lightbulbjim

Copy link
Copy Markdown
Contributor Author

Sorry, I should have elaborated more. It's a little complicated right now while we work towards making PG18 the new default.

The discourse-web-only variant of the image contains both PG15 and PG18 clients and is intended to run with a standalone Postgres server.

The discourse-release variant is derived from discourse-web-only and adds the PG15 server. This is intended for running everything in a single container but can also be used with a separate Postgres server (which is how we use it internally).

The PG18 template added by this PR isn't referenced by anything in this repo yet. We have some internal tooling which will consume the template and unblock the PG18 upgrade on our hosted platform. At some point during or after that upgrade we'll replace the PG15 server with PG18 in the release image and templates and then anyone who pulls the latest version of discourse_docker will be upgraded.

If you want to test it now you can do so by updating the image referenced in launcher and the templates to one which includes the PG18 server, and using this new Postgres template instead of the default. That will use the double rebuild workflow to upgrade an existing PG15 container.

We are considering options to simplify some of this in the future. Right now the upgrade process is a bit complicated because of the way we use this repo internally.

@lightbulbjim
lightbulbjim merged commit 8ee40ba into main Jul 14, 2026
5 checks passed
@lightbulbjim
lightbulbjim deleted the chrisr/pg18-template branch July 14, 2026 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants