fix(db): keep the PostgreSQL volume name stable across major upgrades - #1673
Merged
Conversation
Contributor
|
Warning Review limit reachedNext included review available in 4 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Reverts the postgresql-data-v18 rename from #1627 before it ships in a release. A PostgreSQL 18 container pointed at PostgreSQL 17 data fails loudly (the image entrypoint refuses to start), which is strictly safer than the rename's silent healthy-but-empty stack; stable volume names are the Compose norm, and a version-suffixed name forces a rename at every future major. The upgrade drill now rehearses the stable-name flow (dump, destroy the volume, fresh PostgreSQL 18 init, restore) and proves the loud-refusal property; the operator runbook and ADR 0038 are amended to match. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
FelixTJDietrich
force-pushed
the
fix/stable-postgres-volume-name
branch
from
August 31, 2026 13:10
8074403 to
e619501
Compare
FelixTJDietrich
enabled auto-merge
August 31, 2026 13:10
Contributor
📚 Documentation Preview
|
Contributor
🧩 Storybook Preview
|
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.
Motivation
#1627 renamed the self-hosted PostgreSQL volume to
postgresql-data-v18(and the preview stack's topostgres-data-v18) so a rollback would retain the PostgreSQL 17 cluster. Review flagged the residual risk that decision carries: an operator who upgrades without migrating gets a stack that comes up healthy but empty, because Compose silently creates the new volume. None of this has shipped — the PostgreSQL 18 qualification is still in the unreleased pending section — so the name can be corrected in the same release with no deployed instance ever seeing-v18.Description
Maintainer decision: the volume goes back to its stable
postgresql-dataname (postgres-datain the preview stack).postgres:18in this PR's drill work.scripts/postgres-major-upgrade-test.tsnow rehearses the shipped flow under one stable-named volume — dump, prove PostgreSQL 18 refuses the un-migrated volume, destroy the volume, recreate it under the same name, fresh PostgreSQL 18 init, restore, and the existing partman/Liquibase/data assertions. Rollback safety moves from a retained volume to the verified dump (pg_restore --listbefore the destructive step). The drill passes locally end to end.docs/admin/backup-restore.mdx§ "PostgreSQL 17 to 18" is rewritten as the stable-name operator flow (a)–(g): verified custom-format dump with an off-host copy,dc down postgres,docker volume rm <project>_postgresql-data(withdocker volume lsto find the exact name), fresh start, restore,ALTER EXTENSION pg_partman UPDATE, verification. It states explicitly that step (c) destroys the old data and that skipping steps fails loudly.MIGRATION.md's### Next releasesection, which feature PRs must not edit (verify-changesetsenforces it). Its "keep the PostgreSQL 17 volume until acceptance checks pass" advice is impossible under the stable-name flow, so this PR adds.migration/stable-postgres-volume-name.md, a fragment that explicitly corrects that entry (fragments are appended after the pending text under the same version heading at stamping). Note for the release assembler: when cutting the release, the older "Restore PostgreSQL 17 data into PostgreSQL 18" entry can be folded into / trimmed against this correcting fragment.**Operators:**summary; since the-v18name never shipped, this folds into the same release as the PostgreSQL 18 qualification.Checklist
pnpm run test:tooling,check:preview-stack,check:changesets,docs:lint,lint:agents,typecheck:scripts: passdocker compose config); postgres mountspostgresql-data:/var/lib/postgresqlpnpm run test:postgres-upgrade(the rewritten drill) passes locally end to end🤖 Generated with Claude Code