feat(postgres): support PostgreSQL 19

PostgreSQL 19 was released on 19.11.2026, and TREK refused it at boot as
newer than the 14 to 18 it supported (discussion #3214). It now supports 14
to 19.

The image installs the version 19 client tools from PGDG's main component,
since the per-major component can trail a new release; a client handles
every server up to its own major, so pg_dump, pg_restore and psql 19 back up
and restore every supported server. The tools are looked for in the 19
directory first. Installs that pointed TREK_DB_PG_BIN_DIR at the old
/usr/lib/postgresql/18/bin keep working: the image keeps that path as a link
to the 19 tools. CI runs the Postgres lane on 14 and 19 instead of 14 and
18, so the job count stays the same, and the Docker job boots on 19. The
list of server functions and roles that reach the host was checked against
the release notes; PostgreSQL 19 adds none. The compose example stays on 18,
because an existing database stays on the major it was created with.
This commit is contained in:
Maurice
2026-11-26 23:36:36 +01:00
parent a9fd443b63
commit 39d2196a14
20 changed files with 102 additions and 65 deletions
+7 -6
View File
@@ -21,11 +21,12 @@
# superuser trek; the wiki page Database-Postgres ("Moving a compose install
# off the superuser") shows how to move it to this layout.
#
# The database runs PostgreSQL 18. TREK supports 14 to 18: to run 14 to 17,
# change the image tag and mount the volume at /var/lib/postgresql/data
# instead, where those images keep their data (the 18 image refuses that
# path). An existing database stays on the major it was created with: when
# you update this file, keep your image tag and volume path. Moving to
# The database runs PostgreSQL 18. TREK supports 14 to 19: a new database
# may run postgres:19 on the same volume path. To run 14 to 17, change the
# image tag and mount the volume at /var/lib/postgresql/data instead, where
# those images keep their data (the 18 and 19 images refuse that path). An
# existing database stays on the major it was created with: when you update
# this file, keep your image tag and volume path. Moving to
# another major needs pg_upgrade, or a dump and restore (a TREK backup
# restored into a new, empty database of the same or a newer major), never
# just a new image tag.
@@ -46,7 +47,7 @@ services:
- no-new-privileges:true
# No ports are published: only the trek service on the compose network reaches the database.
volumes:
# The path the postgres:18 image expects. Images 14 to 17 need
# The path the postgres:18 and :19 images expect. Images 14 to 17 need
# /var/lib/postgresql/data here (see the top of this file).
- trek-pgdata:/var/lib/postgresql
healthcheck: