Skip to content

feat(cnpg): Add PostgreSQL 17 and 18 support - #49279

Open
nblondiau wants to merge 1 commit into
trueforge-org:common2026from
nblondiau:feat/pg17-pg18-support
Open

feat(cnpg): Add PostgreSQL 17 and 18 support#49279
nblondiau wants to merge 1 commit into
trueforge-org:common2026from
nblondiau:feat/pg17-pg18-support

Conversation

@nblondiau

@nblondiau nblondiau commented Jun 19, 2026

Copy link
Copy Markdown

Description

Adds PostgreSQL 17 and 18 support to the CNPG integration of the common library. Users can now set pgVersion: 17 or pgVersion: 18 on a CNPG cluster and the correct operand image is selected automatically.

This extends both validation layers - the runtime _validation.tpl guard and the pgVersion JSON-schema enum in schemas/cnpg/cnpg.json (with the generated docs/cnpg/index.md updated to match) - so the new versions are accepted by downstream consumers, not just the template.

Fixes #

Type of change

  • Feature/App addition
  • Bugfix
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor of current code
  • Documentation Changes

How Has This Been Tested?

  • Unit tests: added 7 cases to cluster_spec_test.yaml asserting the correct spec.imageName for each new image key (postgres 17/18, postgis 17/18, vectors 17, vectorchord 17/18), plus a negative case in cluster_validation_test.yaml proving type: vectors + pgVersion: 18 fails with a clear message (pgvecto.rs has no PG18 build). Full common-test suite passes locally (helm unittest -f "tests/**/*.yaml").
  • Install tests: added cnpg-pg17-values.yaml, cnpg-pg18-values.yaml and cnpg-pg18-postgis-values.yaml to the common-tests install matrix; these deploy real CNPG clusters (operator chart 0.27.1) on PG17, PG18 and PG18+PostGIS via ct install.
  • Every image tag and digest was verified against the live ghcr.io registry before pinning.

Notes:

New images and pinned digests:

Key Repository Tag
postgres17Image ghcr.io/cloudnative-pg/postgresql 17.10
postgres18Image ghcr.io/cloudnative-pg/postgresql 18.4
postgresPostgis17Image ghcr.io/cloudnative-pg/postgis 17-3.5
postgresPostgis18Image ghcr.io/cloudnative-pg/postgis 18-3.6-standard-bookworm
postgresVectors17Image ghcr.io/tensorchord/cloudnative-pgvecto.rs 17.5-v0.4.0
postgresVectorchord17Image ghcr.io/tensorchord/cloudnative-vectorchord 17.9-1.1.1
postgresVectorchord18Image ghcr.io/tensorchord/cloudnative-vectorchord 18.3-1.1.1
  • PostGIS 18: published only under the new tag scheme (18-3.6-standard-bookworm); no plain 18-3.x tag exists in ghcr.io/cloudnative-pg/postgis, so that scheme is used for the 18 entry while 15-17 keep their existing plain tags.
  • pgvecto.rs 18: ghcr.io/tensorchord/cloudnative-pgvecto.rs has no PostgreSQL 18 build (the project is superseded by VectorChord - its highest major is 17), so postgresVectors18Image is intentionally not added. VectorChord covers PG18.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made changes to the documentation
  • I have added tests to this description that prove my fix is effective or that my feature works
  • I increased versions for any altered app according to semantic versioning
  • I made sure the title starts with feat(chart-name):, fix(chart-name):, chore(chart-name):, docs(chart-name): or fix(docs):

Please don't blindly check all the boxes. Read them and only check those that apply.
Those checkboxes are there for the reviewer to see what is this all about and
the status of this PR with a quick glance.

@CLAassistant

CLAassistant commented Jun 19, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@alfi0812

Copy link
Copy Markdown
Member

Needs to be retargeted towards common2026 branch.
Also need to keep our default template for prs.
Missing all testing of the new images like we have for previous versions. (Possivly unit-tests + install tests)

@alfi0812 alfi0812 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment above

@alfi0812

Copy link
Copy Markdown
Member

There also is a postgis 18 image. So let's use proper research and more human work then Ai dumbs please. Thanks

@alfi0812

Copy link
Copy Markdown
Member

PostGIS and pgvecto.rs images for PG 18 are not yet available from upstream

Wrong

@alfi0812

Copy link
Copy Markdown
Member

All existing tests pass (1352/1352)

That just covers or unit tests not install tests and also misses any additional tests for your changes.

@alfi0812

Copy link
Copy Markdown
Member

cluster_validation_test.yaml: Updated test to expect new valid versions

Doesn't seem to be part of this pr. So wrong claim. Missing any testing

@alfi0812
alfi0812 marked this pull request as draft June 19, 2026 23:14
@alfi0812
alfi0812 changed the base branch from master to common2026 June 19, 2026 23:15
@alfi0812

alfi0812 commented Jun 19, 2026

Copy link
Copy Markdown
Member

Got some work to do to make that work again. (Proper rebase)

@nblondiau
nblondiau force-pushed the feat/pg17-pg18-support branch 4 times, most recently from 7a032d0 to 27e595b Compare June 20, 2026 06:14
- Add '17' and '18' to valid pgVersions in _validation.tpl
- Add '17' and '18' to the pgVersion enum in schemas/cnpg/cnpg.json and
  regenerate docs/cnpg/index.md (the supported-version gate for consumers)
- Reject type 'vectors' + pgVersion '18' with a clear message (pgvecto.rs has
  no PG18 build; superseded by VectorChord) instead of a cryptic image error
- Add postgres17Image/postgres18Image (cloudnative-pg/postgresql 17.10, 18.4)
- Add postgresPostgis17Image (postgis 17-3.5) and postgresPostgis18Image
  (postgis 18-3.6-standard-bookworm; plain 18-3.x tags are not published)
- Add postgresVectors17Image (pgvecto.rs 17.5-v0.4.0)
- Add postgresVectorchord17Image/18Image (vectorchord 17.9-1.1.1, 18.3-1.1.1)
- Add unit tests for the new image selectors and the vectors/18 guard
- Add cnpg-pg17, cnpg-pg18 and cnpg-pg18-postgis install fixtures + CI matrix entries
- Update cluster_validation_test.yaml for the new valid versions
- Bump common library chart version 30.0.0 -> 30.1.0

pgvecto.rs publishes no PG18 image (superseded by VectorChord), so
postgresVectors18Image is intentionally omitted. All image digests were
verified against the ghcr.io registry.
@nblondiau
nblondiau force-pushed the feat/pg17-pg18-support branch from 27e595b to 53f0356 Compare June 20, 2026 06:32
@nblondiau

Copy link
Copy Markdown
Author

Thank you for your time.
Let's hope I haven't bitten off more than I can chew...

@nblondiau
nblondiau marked this pull request as ready for review June 20, 2026 08:01
@nblondiau
nblondiau requested a review from alfi0812 June 20, 2026 08:02
@alfi0812
alfi0812 dismissed their stale review June 20, 2026 08:25

Now for Puffin

@alfi0812

Copy link
Copy Markdown
Member

@Crow-Control should be in a state worth for you looking at it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants