Fix postgres 18+ volume mount so fresh volumes can boot#27
Merged
Conversation
The 18+ official images store data in a version subdirectory under /var/lib/postgresql and refuse to boot when a volume is mounted at the legacy /var/lib/postgresql/data path. The dev stack only stayed green because its postgres container predated the 18.4 image bump and was never recreated; any fresh boot (dev or the benchmark client's own stack) failed. Data is disposable dev seed data - recreate with 'docker compose down -v' + 'just db-up'.
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.
Problem
postgres:18+ official images refuse to boot when a named volume is mounted at the legacy /var/lib/postgresql/data path (docker-library/postgres#1259). Our dev stack only stayed green because its postgres container predated the 18.4 image bump and was never recreated; after the first real teardown, no postgres boot succeeded anywhere:
just db-up): postgres exits 1 on bootcomposeDownrunsdown -v, so it always cold-boots a fresh volume and failed 100% of the timeFix
Mount the named volume at /var/lib/postgresql (the 18+ recommended new-deployment form; data goes to the version subdirectory, enabling pg_upgrade --link later). Dev data is disposable seed data — migrate with
docker compose down -v+just db-up.Verification
node scripts/contract.mts go-chi --build: 87/87node scripts/verify.mts root: PASSNote for Phase 2: the metrics-postgres container must use this same mount pattern.