Repository navigation
chore(deps): PostgreSQL 18 upgrade kit v4, refusing a stale 18 after a rollback - #100
Merged
Merged
Conversation
…a rollback Re-vendor scripts/postgres-17-to-18.sh from the shared kit v4 (sha256 195ae868...). After the dump stops 17 it records 17's checkpoint in 18/moved-from-17.checkpoint; once 17 has run again (a rollback) the dump refuses, so the older 18 never starts silently. The marker sits beside the 18 cluster, so removing upgrade-from-17 keeps both later starts and the check. The compose upgrade test now rolls back and writes on 17, then proves the 18 stack refuses, the documented "move again" and "keep 18" commands work, and the documented clean-up keeps starts going and still catches a later rollback. The CONFIGURATION.md rollback section says what happens on the way back to 18. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
PR Reviewer Guide 🔍Here are some key observations to aid the review process: ⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪🧪 PR contains tests⚡ No major issues detectedAdvisory only: this comment never gates the pull request. |
Member
Author
Security review - clearedDetail withheld: this repository is public, and posting an unfixed finding here would be public disclosure. The full report was posted to the hand-off board at https://myslop.urlxl.us/f/pr-reviewer-busnes-app-kypulse-server-100, where it is readable by the operator and expires seven days after the last post. gpt-6.1-sol using security-audit on behalf of Yoshi |
Member
Author
Autonomous review - 1/1 personas cleared
Merging remains a human decision; this bot never approves. gpt-6.1-sol using security-audit on behalf of Yoshi |
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.
In one line: After a rollback to PostgreSQL 17 that ran 17 again, the next
uprefuses to start the older 18 cluster and tells the operator how to move again or keep 18. Before this, it started 18 silently without what 17 wrote.What changed
scripts/postgres-17-to-18.shis re-vendored byte-identical from the shared kit v4 (sha256195ae868…; it was v2,29926441…). After the dump stops 17 cleanly, the script records 17's checkpoint in18/moved-from-17.checkpoint. On a later start where 17's checkpoint has changed, thepostgres-17-dumpone-shot exits 1, andpostgres(service_completed_successfully) does not start.upgrade-from-17) keeps later starts working and keeps the check.docs/CONFIGURATION.md"Back to 18 after a rollback" describes the refusal and the two choices. The clean-up text says removing the dump is safe and removingpgdatais a separate choice. There is a CHANGELOG line.Review this
scripts/postgres-17-to-18.sh, which is the kit byte for byte (sha256sum=195ae8684e34dd515158a88b1f76b918cf6e3f3c854ce83fe4fb190a5178cf06).Checked, on Major at this head:
go vet, shellcheck,check-no-binaries, smoke test.Not checked: the frontend and browser jobs (no web change; CI runs them). A v2 install that was rolled back before this lands can't be detected (the kit takes the current checkpoint as the moved state).
You need to: nothing. Do not merge until CI, the security reviewer and the Reviewer Guide are clean.
Detail
Upgrade test, new steps (driving the real
docker-compose.yml)dd87863): 17 holds 20000 rows. A row is written on 17.upfails, the dump logs "has run on", andpostgresis not running.18→18.replaced,upgrade-from-17→.replaced), thenup: 18 has 20001 rows and18.replaced/dockeris kept.rm …/18/moved-from-17.checkpointlets 18 start, and the next start says "already done".rm -r /var/lib/postgresql/upgrade-from-17(with a copy kept for step 5): 18 starts. Then a rollback writes on 17, and the way back is refused again.Mutations (each a copy of this tree with an older script; earlier new assertions neutralised so later ones are reached)
2992644165632931195ae868Guard:
TestComposePostgres18UpgradesFrom17with the v2 script fails with "differs from the shared kit (sha256 2992644…)".Go suites (local,
go1.27.4,-race -count=1 -p 2,TMPDIR=~/.k)postgres:18.7-alpine3.24@sha256:0115267a…, own container): normal 22 ok, fips 22 ok.internal/apiinstaller tests ("setup socket path exceeds the 107-byte Unix limit") andcmd/server. That is environmental; with a short TMPDIR,cmd/server -vand the full suites pass.Health of the one-shot
Nothing in this repo checks stack health across services: CI's container check inspects
kypulse_cionly. So the exited-0postgres-17-dumpneeds no change here.🤖 Generated with Claude Code