Skip to content

Require PostgreSQL 18 or newer - #641

Merged
schmitch merged 1 commit into
mainfrom
claude/637-postgres-18
Oct 28, 2026
Merged

schmitch merged 1 commit into
mainfrom
claude/637-postgres-18

Conversation

@schmitch

Copy link
Copy Markdown
Member

Fixes #637

Forge now requires PostgreSQL 18; before, it accepted 15 or newer (17 tested). That lets later changes use what 17 and 18 added, such as MERGE … RETURNING and OLD / NEW in RETURNING. No query changes here.

Changes

  • Docs: docs/deployment.md asks for PostgreSQL 18+. DEVELOPMENT.md says the host PostgreSQL behind --db local must be 18 too, and how to remove the old dev volume.
  • Upgrade note (docs/changes/2.2.0/637.upgrade.md): on PostgreSQL 15 to 17, upgrade PostgreSQL first (pg_upgrade or dump/restore), then Forge. Forge does not check the server version at startup.
  • CI: the clippy (sqlx check), oci-e2e, raw-e2e and npm-e2e service containers and the image smoke test run postgres:18, pinned to the digest deploy/ already pins (checked on mirror.gcr.io). The e2e and web-e2e pre-pulls use :18.
  • Test harnesses: every testcontainers Postgres (core, db, storage, server, e2e) and the Playwright stack (web/e2e) run 18.
  • Dev docker-compose.yml: runs 18 and mounts a new volume, postgresql, at /var/lib/postgresql. The 18 image keeps its cluster in /var/lib/postgresql/18/docker and refuses to start with a volume on /var/lib/postgresql/data. It also can't open the 17 cluster in the old db_data volume.
  • Helm chart / kustomize: they already ran 18, so only comments and READMEs that said 17 changed.

Testing

  • .github/scripts/test-parallel.sh --workspace against PostgreSQL 18: 114 test binaries, 1693 passed, 0 failed.
  • sqlx migrate run + cargo sqlx prepare --check --workspace -- --all-targets --all-features against postgres:18@sha256:edb0c08…: the committed .sqlx/ cache matches.
  • docker compose up db: 18.6 starts healthy with data_directory /var/lib/postgresql/18/docker. With the old mount on /var/lib/postgresql/data, the 18 image refuses to start (checked).
  • .github/scripts/image-pin-check.sh and cargo xtask changelog --check pass.

Generated by Claude Code

The deployment guide asked for PostgreSQL 15 or newer (17 tested), and the
dev stack, CI and the test harnesses ran 17, while the in-cluster PostgreSQL
of the Helm chart and the kustomize component already ran 18. Requiring 18
lets queries use what 17 and 18 added (MERGE ... RETURNING, OLD/NEW in
RETURNING, uuidv7(), ...).

- docs/deployment.md asks for PostgreSQL 18+; an upgrade note tells
  operators on 15 to 17 to upgrade PostgreSQL before Forge.
- docker-compose.yml, the CI service containers (pinned to the digest
  deploy/ pins), the image smoke test, the testcontainers harnesses and
  the Playwright e2e stack run 18.
- The dev compose mounts its volume at /var/lib/postgresql, in a new
  volume: the 18 image refuses to start with one on
  /var/lib/postgresql/data, and cannot open the old 17 cluster.

Fixes #637

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012e6DJXi8YkJFDoeo91dx68
@schmitch
schmitch enabled auto-merge October 28, 2026 22:18
@schmitch
schmitch added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit 7fb7210 Oct 28, 2026
21 checks passed
@schmitch
schmitch deleted the claude/637-postgres-18 branch October 28, 2026 22:34
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.

Require PostgreSQL 18 or newer

2 participants