Repository navigation
chore(deps): PostgreSQL 18 upgrade kit v4: refuse 18 after a rollback to 17 - #128
Merged
Merged
Conversation
… to 17 Re-vendor scripts/postgres-17-to-18.sh from the shared kit v4 (sha256 195ae868...). After the dump stops 17 it records 17's latest checkpoint in 18/moved-from-17.checkpoint; when 17 has run since (a rollback), the one-shot refuses, so 18 never starts silently without what 17 wrote. The operator moves 17 again (rename 18/ and upgrade-from-17/) or keeps 18 (delete the marker). The marker sits beside the 18 cluster, so the documented clean-up of upgrade-from-17/ keeps 18 starting and the check armed. The upgrade test drives the repo's compose files through the refused re-upgrade, "move again", "keep 18" and the clean-up. The guard pins the new checksum; docs and release notes describe 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-ky-server-base-128, 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 wrote data, switching back to the 18 compose files no longer silently starts the older 18; the stack stops and tells the operator their two choices.
What changed
scripts/postgres-17-to-18.shis now shared kit v4, byte for byte (sha256195ae868…cf06, was v229926441…). After the dump stops 17 cleanly, the kit records 17's checkpoint in18/moved-from-17.checkpoint. If 17 runs again later,postgres-17-dumpexits 1 and PostgreSQL does not start.18/andupgrade-from-17/, and the nextupdumps 17 afresh) or keep 18 (delete the marker file).rm -r upgrade-from-17) keeps 18 starting, and the rollback check stays armed. This is kit v3's outage, fixed in v4.scripts/test-postgres-17-to-18.sh(CI jobPostgreSQL 17 to 18 upgrade (Compose), name unchanged) runs all of this on the repo's real compose files, base and replicas. The cases are the refused re-upgrade, move again (the row written on 17 reaches 18 and the replaced 18 is kept), keep 18, and clean-up followed by a refused later rollback.check-replicas-compose.pypins the v4 checksum. The rollback docs, AGENTS.md and the CHANGELOG are updated. The previous Current source is archived undereceb24e.Review this
refused(): a refusal counts only when three things hold:upfails, the dump log carries the kit's rollback message, and nopostgrescontainer is running.scripts/postgres-17-to-18.shis the vendored kit, identical to the shared copy. Diff it against the kit, don't review it here.Checked (on Major, at c9fef68)
basePASS (55 s) andreplicasPASS.FAIL: 18 started without the row written on 17 during the rollback(3b);FAIL: 18 started after a rollback (keep-18 check)(4b);FAIL: after the clean-up, 18 started without what 17 wrote since(4c);FAIL: 18 did not start after the documented clean-up(4c).make notes-check tidy-check lint test-web audit-web smokepasses (Node 26.13.1), andshellcheck scripts/*.shis clean.go vetandgo test -raceon SQLite: kjob exit 0. Every K host was busy, so it ran on Major.go test -raceand the FIPS profile against a localpostgres:18.7-alpine3.24@sha256:0115…both pass.Not checked
Compose replicas and failover) was not run locally; CI runs it. No Go or compose file changed.You need to: nothing. Merge when CI and both reviewers are clean.
Detail
fed0fb3compose files and write a row on 17.upwith the current files is refused.18.replaced/dockeris kept.GIT_DIRpointing at the repo.~/.cache/ky-workers/pg18/kit/test-postgres-17-to-18.sh) is the model; this repo's test drives Compose instead ofdocker run.🤖 Generated with Claude Code