Repository navigation
fix(docker): ship the newest supported PostgreSQL client, not the bundled major - #1432
Merged
MBombeck merged 2 commits intoNov 22, 2026
Merged
Conversation
…dled major A client reads servers of its own major and older and refuses a newer one, so the `pgclient` pin is the ceiling on the server an install may run — the installs that bring their own database included, which docs/ops/postgres-major-upgrade.md invites: "HealthLog runs on 16 and 18 alike, and the move there is yours to schedule". With the client pinned to the bundled major, such an install stops dumping the moment its server moves to 19, and then fails to boot at the next release that carries a migration, with pg_dump's version-mismatch line inside the entrypoint's "not migrating without the dump". The nightly dumps go first and quietly; the boot goes hours or days later, which is what makes the cause hard to find. Take the client from postgres:19.0-trixie and let it lead the bundled database rather than match it: one pg_dump serves a server on 16, 18 and 19 alike. The bundled database is not touched, so nothing moves on disk for anybody, and db-upgrade stays as it is. runtime-package-pins.test.ts holds the order now instead of the equality, and ties the install path and the image's own --version check to whatever major the pin names. postgres-major-upgrade.md states the ceiling for a bring-your-own server and how to read it off the release you run. Co-Authored-By: Claude Opus 5 <[email protected]>
The pgclient stage may lead the bundled database now, so the stage list in the canvas hoist guard matches the major as a number rather than 18.
2 tasks done
MBombeck
pushed a commit
that referenced
this pull request
Nov 22, 2026
#1432 moved the `pgclient` pin to major 19 and changed what the pin test holds, and left this note describing the rule it replaced: it still names major 18 for the runner's paths and version checks, says the client's minor moves with the bundled database's, and says runtime-package-pins.test.ts fails while the two differ. That test now fails only if the client falls below the bundled database. The ignore rule itself is unchanged. A client major stays a decision rather than an update PR — now a decision about the newest server major the project supports rather than about the bundled database's major.
Merged
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.
Follows #1431, the client half of it. It changes one pin, one test and one
doc section; the bundled database,
db-upgradeand every volume stay exactly as they are,so this moves nothing on disk for anybody.
Why
pg_dumpandpg_restoreread servers of their own major and older and refuse a newerone. The
pgclientpin is therefore not only "which client ships", it is the ceiling onthe server major an install may run — including installs that bring their own database,
which
docs/ops/postgres-major-upgrade.mdexplicitly invites ("HealthLog runs on 16 and18 alike, and the move there is yours to schedule").
With the client at the bundled major, such an install breaks in two stages once its
server moves to 19:
db-restorecheck and every manualdb-dumpfail at once, whichnothing surfaces to the operator;
aborts with
server version mismatch, the entrypoint correctly refuses to migratewithout a dump, and the container crashloops.
The gap between the two is what makes it hard to read: here the server moved at 22:00 and
the app only fell over at 01:02 the next day, with a release that had nothing to do with it.
What it does
pgclientcomes frompostgres:19.0-trixie(digest-pinned, same multi-arch image), andthe install path, loader config,
PATHand the two--versionbuild checks move withit.
src/__tests__/runtime-package-pins.test.tsholds the order rather than the equality:the client may lead the bundled database, never trail it. It also derives the expected
COPYpath and the Dockerfile's own--versiongrep from whatever major the pin names,so the next move keeps them honest.
docs/ops/postgres-major-upgrade.mdstates the ceiling for a bring-your-own server, andgives a one-liner that reads the client major off any release.
One client on 19 serves a server on 16, 18 and 19 alike, so the matrix the docs promise
holds for the first time.
The tradeoff, stated plainly
The rule this replaces was deliberate, and it bought one thing this does not: the
disaster-recovery path (
db-restore,docs/ops/disaster-recovery.md) now runs apg_restore19 against the bundled 18 server. Dumping an 18 server with a 19 client isfully supported; restoring into an older server is the direction PostgreSQL only says
"should work", with the caveat that the archive was produced from that same 18 server, so
nothing in it is newer than the target. If you would rather not take that, the alternative
is the bundled-database bump discussed in the issue, and this PR should wait for it.
Verification
Run on this branch, against a clean install of the lockfile (pnpm 11.15.1):
tsc --noEmit— clean.prettier --check .— clean.eslint— 0 errors (3 warnings, all pre-existing and none in the changed files).runtime-package-pins.test.tsanddatabase-pin-is-watched.test.ts— 7 tests, allpassing, including the rewritten rule and the two derived assertions.
Left to CI, because there is no Docker on this machine: the image build itself, the e2e
suites, and with them the one thing I cannot prove from the outside — that the
pg_dump19in the built image dumps a live 18 server. That is the documented client contract rather
than a guess, and the build check holds the version the binaries report.
One aside from running the checks, unrelated to this change: on Windows
pnpm testcollectsnothing, because the per-file project classification in
tests/unit-projects.tshandsincludebackslash paths that the glob matcher never matches ("No test files found", allthree Node projects). Hence the two suites above were run directly. Happy to open a separate
issue if that is worth having.
Drafted with Claude Code; the reasoning, the checks above and this description were reviewed by me before sending.