Commit Graph
4 Commits
Author SHA1 Message Date
Andrey Kolkov b40be51a6b fix(postgres): move the default flavor to patched standard-trixie images
The default flavor pinned bare image tags, which are the system variant
on Debian bullseye. Upstream stopped building that variant, so the minors
that fix CVE-2026-116331 (18.7, 17.12, 16.16, 15.20, 14.25) are published
for bookworm and trixie only. The CVE is a type confusion in the min/max
aggregate optimisation that lets a role able to create objects run code
as the operating system user of the server, and tenants hold such roles.

Pin the patched minors on standard-trixie, and move the postgis flavor to
the same minors. The standard variant, because backups go through the
barman-cloud plugin and need none of the barman binaries the system
variant adds. trixie, because the postgis flavor is on it already, so
both image families share one Debian release. PostgreSQL 13 has no
patched release: it keeps 13.22 and moves to trixie with the rest.

For a running default-flavor cluster this changes the Debian release under
the data directory. The init Job rebuilds the indexes that depend on a
collation whose library version changed.

Assisted-by: LLM
Signed-off-by: Andrey Kolkov <androndo@gmail.com>
2026-11-25 15:55:03 +07:00
Mattia Eleuteri e4810d3268 fix(postgres): require a postgis image for every postgres major
The updater used to warn and leave a major out of postgis-versions.yaml
when the registry had no postgis build for its minor yet, while
versions.yaml still advertised it. `flavor: postgis` on that major then
failed to render. Postgis images trail the PostgreSQL ones, so this is a
routine state rather than an edge case: stop before writing either map
and let the next run pick up both once the image is published.

The version check now also compares the majors of the two maps, so a
map edited by hand cannot drop one silently. It is written in POSIX sh:
cozytest.sh sources it into /bin/sh, which is dash on the CI runners and
rejected the ${var//} expansions the first version used.

Assisted-by: LLM
Signed-off-by: Mattia Eleuteri <mattia@hidora.io>
2026-10-01 18:30:37 +02:00
Mattia EleuteriandMatthieu dc2971264d feat(postgres): add a postgis image flavor
Tenants migrating spatial data need PostGIS, but the chart always runs
the CloudNativePG PostgreSQL image, which does not ship it, and exposes
no way to pick another one. CloudNativePG publishes a PostGIS operand
image; a closed `flavor` enum selects it without handing tenants a free
image field.

The flavor pins the same PostgreSQL minor as the default one, on the
standard-trixie variant: backups go through the barman-cloud plugin,
so the deprecated system variant is not needed. update-versions.sh now
derives the postgis map from the minors it picks, and a bats check
fails if the two maps drift apart.

The default images are built on bullseye and the postgis ones on
trixie. Switching a live cluster between them would swap glibc under
an initialised data directory and silently break every collatable
index, and CNPG would roll it out as a plain image update. The chart
therefore refuses a flavor change on an existing Cluster.

Co-authored-by: Matthieu <matthieu@hidora.com>
Assisted-by: LLM
Signed-off-by: Mattia Eleuteri <mattia@hidora.io>
2026-10-01 18:30:37 +02:00
Andrei Kvapil 3d5118f5b3 [postgres] Add version management system with automated version updates
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-12-01 23:56:55 +01:00