Skip to content

Postgres 19: the update moves an archive to a new PostgreSQL major version - #77

Merged
SebHenn merged 5 commits into
mainfrom
postgres-major-upgrade
Nov 23, 2026
Merged

SebHenn merged 5 commits into
mainfrom
postgres-major-upgrade

Conversation

@SebHenn

@SebHenn SebHenn commented Nov 23, 2026

Copy link
Copy Markdown
Owner

What

PostgreSQL 19 refuses to start on a data directory written by another major version, so a plain image bump (Dependabot #73) breaks every existing archive. The update now handles a major change itself.

  • scripts/update.sh: detects a major change, stops the app, backs up and re-verifies the checksums, sets the old data aside in the volume (18/kept), starts a fresh PostgreSQL 19 and restores the dump (restore.sh --database-only). Nothing is deleted; the final message prints the removal command.
  • A failed move goes back to the old data and the previous release. An interrupted run leaves a marker (.update-in-progress): a re-run refuses and prints recovery steps; update.sh --recover clears it.
  • Majors are validated as digits (new higher than old) before any rm or mv; the disk check counts the second database copy.
  • compose.yaml and the Testcontainers images move to postgres:19-alpine (compose pinned by digest).
  • Docs: operations.md, deployment.md, development.md, security.md (row for the kept old database), CHANGELOG.md.

Supersedes #73.

Tested

  • scripts/test-update.sh (v0.5.0 on PG18 to this code on PG19): data survives, failed-update rollback returns the original database, interrupt and recover case, removal command. Also test-update.sh 0.1 and test-backup-restore.sh.
  • Release build, main suite (581 passed, 6 skipped) and browser suite (210 passed) on PG19.
  • gitleaks clean; every commit signed off.
  • Not run locally: update-from for 0.2 to 0.5 (CI), /security-review. Not testable here: a real long-running archive, disk-full conditions.

🤖 Generated with Claude Code

SebHenn and others added 5 commits November 23, 2026 19:10
…e update

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Signed-off-by: Seb H. <[email protected]>
…refuses to start next to it

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Signed-off-by: Seb H. <[email protected]>
@SebHenn
SebHenn merged commit 8107a59 into main Nov 23, 2026
17 checks passed
@SebHenn
SebHenn deleted the postgres-major-upgrade branch November 23, 2026 18:49
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.

1 participant