Move to PostgreSQL 18 (supersedes #284)#288
Open
richardmhope wants to merge 1 commit into
Open
Conversation
The postgres:18 image relocated its data volume from /var/lib/postgresql/data to /var/lib/postgresql, with PGDATA defaulting to a versioned subdirectory (/var/lib/postgresql/18/docker) so a future in-place pg_upgrade can hold two versions. A bare image bump — what Dependabot's #284 does — would leave the cluster writing to an anonymous volume, losing data on container recreate. - docker-compose.yml: postgres:18 + move the iceberg-pg-data mount to /var/lib/postgresql, with a comment explaining the layout change - deploy/k8s/postgres.yaml: postgres:18 + move the PVC mountPath to /var/lib/postgresql (subPath unchanged) - .github/workflows/ci.yml: bump both service containers (postgres-smoke + docker boot smoke) to postgres:18 - README.md: refresh the compose deployment diagram - website/docs/deployment.md + deploy/k8s/README.md: document that a major upgrade (17 → 18) requires dump/restore — a 17-initialised volume/PVC is not directly reusable - CHANGELOG.md: record the move under Unreleased → Changed Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SCSCCyvyMQAF8aHzpPyFYb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dependabot's #284 bumps
postgres17 → 18 indocker-compose.ymlonly, but this major bump is more involved than an image-tag change: the officialpostgres:18image relocated its data volume from/var/lib/postgresql/datato/var/lib/postgresql, withPGDATAnow defaulting to a versioned subdirectory (/var/lib/postgresql/18/docker) so a future in-placepg_upgradecan hold two versions side by side. With the bare bump, the namediceberg-pg-datavolume would still be mounted at the old…/datapath while the cluster is written under the image's new anonymous volume — i.e. silent data loss on container recreate. It also leaves the Kubernetes StatefulSet and the CI service containers on 17.This PR does the full move and documents the operator-facing upgrade path.
Changes
docker-compose.yml—postgres:18; theiceberg-pg-datamount moves to/var/lib/postgresql, with a comment explaining the 18 layout change and why the old path would strand the cluster on an anonymous volume.deploy/k8s/postgres.yaml—postgres:18; PVCmountPathmoves to/var/lib/postgresql(thesubPath: pgdataindirection is unchanged)..github/workflows/ci.yml— both service containers (postgres-smokeand thedockerboot smoke) bumped topostgres:18, so CI exercises the same major version the deployments run.README.md— compose deployment diagram refreshed (image tag + volume path).website/docs/deployment.md/deploy/k8s/README.md— backup & restore sections now document that a major Postgres upgrade (17 → 18) rides the existing dump/restore path: a data directory initialised by one major version cannot be opened by the next, so a 17-era volume/PVC is not directly reusable.CHANGELOG.md— recorded under Unreleased → Changed.No application-code changes are needed: the app talks to Postgres via
psycopgv3 / SQLAlchemy, and nothing in the migrations or thetsvectorFTS path is version-sensitive across 17 → 18.Testing
docker-compose.yml,deploy/k8s/postgres.yaml,.github/workflows/ci.yml)postgres:17/ stale/var/lib/postgresql/datamount references (the old path now appears only in upgrade-note prose)postgres-smoke+dockerCI jobs run on push tomain(they're skipped per-PR by design) and will validate migrations, tsvector search, and the boot smoke against Postgres 18Checklist
README.md,website/docs/deployment.md,deploy/k8s/README.md,CHANGELOG.md)🤖 Generated with Claude Code
https://claude.ai/code/session_01SCSCCyvyMQAF8aHzpPyFYb
Generated by Claude Code