Repository navigation
Add PostgreSQL 19 packaging images - #1203
Conversation
Add PG19 to supported Debian and Ubuntu all-version images and AlmaLinux 9 while excluding platforms without PGDG packages. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ec791dd5-2c12-4c71-acdd-8aef6a52fc1e
f373097 to
425733d
Compare
There was a problem hiding this comment.
Pull request overview
Adds PostgreSQL 19 (Beta 2) support to the packaging image/tooling, including updated Debian/Ubuntu “all-version” images and a new AlmaLinux 9 PostgreSQL 19 image, plus CI workflow matrix updates to exercise the new target.
Changes:
- Extend supported PostgreSQL versions to include 19 in image build/push scripts and Debian/Ubuntu all-version images.
- Add AlmaLinux 9 PostgreSQL 19 Dockerfile and enable
pgdg19-updates-testingfor that image. - Update GitHub Actions workflow matrices to add AlmaLinux 9 / PostgreSQL 19 coverage.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| update_image | Adds PG19 to version list and adds EL8/PG19 rejection logic. |
| update_dockerfiles | Adds PG19 to generation list; skips generating EL8/PG19 RPM Dockerfiles; conditionally keeps pgdg19-updates-testing enablement only for PG19. |
| templates/Dockerfile-rpm.tmpl | Enables pgdg19-updates-testing when building PG19 RPM images. |
| templates/Dockerfile-deb.tmpl | Adds PGDG apt component 19, installs postgresql-server-dev-19, and updates supported versions env var. |
| dockerfiles/ubuntu-resolute-all/Dockerfile | Regenerated from updated DEB template for PG19. |
| dockerfiles/ubuntu-noble-all/Dockerfile | Regenerated from updated DEB template for PG19. |
| dockerfiles/ubuntu-jammy-all/Dockerfile | Regenerated from updated DEB template for PG19. |
| dockerfiles/debian-trixie-all/Dockerfile | Regenerated from updated DEB template for PG19. |
| dockerfiles/debian-bullseye-all/Dockerfile | Regenerated from updated DEB template for PG19. |
| dockerfiles/debian-bookworm-all/Dockerfile | Regenerated from updated DEB template for PG19. |
| dockerfiles/almalinux-9-pg19/Dockerfile | New generated AlmaLinux 9 PG19 image definition. |
| ci/push_images | Adds PG19 to push list and adds EL8/PG19 rejection logic. |
| .github/workflows/image-health-check.yml | Adds AlmaLinux 9 / PG19 to workflow coverage. |
| .github/workflows/build-package.yml | Adds AlmaLinux 9 / PG19 to build workflow coverage. |
| .github/workflows/build-package-test.yml | Adds AlmaLinux 9 / PG19 to build-test workflow coverage. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The EL8 guard in update_image and ci/push_images only fired when POSTGRES_VERSION was explicitly set to 19. With an empty POSTGRES_VERSION (the `all versions'' mode both scripts support) the per-version loop still yielded 19 and attempted to build or push a *-8-pg19 image that update_dockerfiles never generates. Mirror the in-loop guard update_dockerfiles already uses. The existing top-level check is kept so an explicit EL8+PG19 request still fails loudly. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7211f17e-4ca6-41a8-9eb1-633c42a30149
Alper Kocatas (alperkocatas)
left a comment
There was a problem hiding this comment.
Looks good to me, and copilot also could not find any major issues with the update. Here are some non-blocking suggestions. I went through them manually, and honestly, don't think that you should update anything.
Findings / suggestions (all non-blocking / minor)
Fragile RPM repo-enable sed (nit, worth considering). Dockerfile-rpm.tmpl:78 uses positional {n;n;n;s/.*/enabled=1/}, which assumes enabled= is exactly the 4th line of the stanza. If PGDG changes the stanza layout it silently edits the wrong line. Since dnf-plugins-core is already installed and dnf config-manager is used elsewhere in this same Dockerfile, a layout-independent alternative would be:
dnf config-manager --set-enabled pgdg19-updates-testing
The current approach works with today's repo format, so this is optional hardening.
exit 1 vs continue inconsistency (defensive-only). update_dockerfiles:99 skips EL8+pg19 with continue, but push_images:35 and update_image:30 use exit 1. These guards are never actually reachable in the defined matrix (EL8 never pairs with pg19). For update_image (one platform per run) exit 1 is fine; for push_images (loops all platforms) a continue would be safer if it were ever reached manually. Cosmetic given current usage.
Redundant runtime guard. The generated [[ 19 != 19 ]] || sed … guard is always false-and-therefore-runs, since the line only exists in the pg19 file. Harmless / self-documenting; no change needed.
Unrelated: Dockerfile:136 still shows pg18 — but focal was removed from os-list.csv/matrix, so it's intentionally not regenerated. Not this PR's concern.
Summary
citus/packaging:almalinux-9-pg19image definition and enable the PGDG 19 updates-testing repository used by the Beta 2 packagesUnsupported targets
pg_configGenerated files
The source changes update
templates/Dockerfile-deb.tmpl,templates/Dockerfile-rpm.tmpl, andupdate_dockerfiles. The committed generated scope is limited to:dockerfiles/almalinux-9-pg19/DockerfileValidation
update_dockerfiles,update_image, andci/push_imagesin WSLpgdg19-updates-testingand installspostgresql19-develpostgresql-server-dev-19No images were manually published.
Tracks citusdata/citus#8731.