Match pg_dump to the server major, or the nightly backup fails - #15
Merged
Merged
Conversation
The Rust port replaced the image's PGDG-sourced postgresql-client-18 with Debian's default postgresql-client, which is 15. The cluster is 18, and pg_dump refuses to dump a newer server outright: pg_dump: error: aborting because of server version mismatch detail: server version: 18.6; pg_dump version: 15.19 So the deploy went green and the backup would have failed at 09:47 UTC — the same shape as the scale-to-zero break this repo already had once, where `flyctl ssh console` could not wake a stopped machine. The Python Dockerfile had solved this deliberately: add the PGDG apt repo, install postgresql-client-18, purge gnupg afterwards. The port carried over the *importance* of having pg_dump and dropped the *solution*. Restored verbatim. Caught by running the real thing rather than trusting `command -v pg_dump` — the binary was present and on PATH, and still useless. Verified in the rebuilt image: pg_dump (PostgreSQL) 18.6. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
The Rust port replaced the image's PGDG-sourced
postgresql-client-18withDebian bookworm's default
postgresql-client, which is 15. The cluster is18, and pg_dump refuses to dump a newer server:
The deploy was green and the backup would have failed at 09:47 UTC — the same
shape as the scale-to-zero break this repo already had once, where
flyctl ssh consolecouldn't wake a stopped machine.What went wrong in the port
The Python Dockerfile had solved this deliberately — add the PGDG apt repo,
install
postgresql-client-18, purgegnupgafterwards. My port carried overthe importance of having pg_dump (the comment even said "NOT optional here")
and dropped the solution. Restored verbatim.
How it was caught
By running the actual backup on the deployed machine, exactly as
backup.ymldoes — not by checking that pg_dump existed. It existed, was on
PATH, andwas useless:
Rebuilt image now reports
pg_dump (PostgreSQL) 18.6.🤖 Generated with Claude Code