Repository navigation
chore(deps): PostgreSQL 18 with an automatic, non-destructive upgrade from 17 - #97
Conversation
… from 17 The bundled postgres moves to 18.7 (pinned by digest) on a new `postgres` volume mounted at /var/lib/postgresql. A one-shot postgres-17-dump service (17.12, no network) dumps the old `pgdata` volume once; the 18 service runs the shared kit's restore as its entrypoint. `pgdata` is only read and kept. - scripts/postgres-17-to-18.sh: the Ky kit, byte-identical (sha256 29926441…) - scripts/test-postgres-17-to-18.sh: seeds 17 with the previous compose file, then proves the move by `up` over a running 17, the live-17 refusal, rollback, rerun, bad dump and fresh install; run in the docker CI job - deploy_test: guards the digests, mounts, dump one-shot and script checksum - CI postgres service on 18; Dependabot ignores postgres majors - stop_grace_period 2m on postgres and the dump one-shot - docs: operator note in CONFIGURATION.md, CHANGELOG Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR Reviewer Guide 🔍Here are some key observations to aid the review process: ⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪🧪 PR contains tests⚡ No major issues detectedAdvisory only: this comment never gates the pull request. |
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-97, 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 |
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 |
|
Note 🤖 Claude Opus 5.5 responding on behalf of Yoshiofthewire The "Ineffective wait" note doesn't hold:
So the loops allow about one second per attempt, as intended. That gives the ~180 s budget the note expects. A plain |
The read -t on a read-write process substitution did wait a second, but it took a paragraph to show it. A plain sleep says the same thing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In one line: the bundled PostgreSQL (
--profile postgres) is now 18.7. An install that ran 17 is moved by itself on the nextup, and its 17 data is kept.What changed
docker-compose.yml: postgres runspostgres:18.7-alpine3.24@sha256:0115267a…on a newpostgresvolume at/var/lib/postgresql. 18 refuses the old/var/lib/postgresql/datamount, so a plain image bump would crash-loop.postgres-17-dumpservice (17.12 by digest,network_mode: none, same profile) dumps the oldpgdatavolume once. The 18 service runs the kit'srestoreas its entrypoint before the stock one.pgdatais only read and never removed.scripts/postgres-17-to-18.shis the shared Ky kit, byte-identical (sha25629926441…, the 14:49 kit with the live-17 refusal). The script reaches the container by a./scripts/…:robind mount, because operators run compose from a clone (INSTALL.md).scripts/test-postgres-17-to-18.sh, run in the CIdockerjob, drives this repo's real compose file. It seeds 17 with the previous compose file (dd87863), then proves:up -dover the running 17 stack, with rows, a large object, the C collation, and logins forpostgresand a second role by password over the compose network (a wrong password is refused);TestComposePostgres18UpgradesFrom17) pins both digests, the mounts, the dump one-shot and the script's checksum. Other changes:dockerandgithub-actions;docs/CONFIGURATION.md, plus a CHANGELOG entry.Review this
trust.scripts/postgres-17-to-18.sh(the shared kit, reviewed inky-postgres-18), Makefile comment, CHANGELOG.Checked
go mod tidy/verifyand vet: PASS on k81.shellcheck scripts/*.shpasses with no exclusions;docs/check-strong-crypto-compose.pypasses.Not checked
Decided for you
postgres. The oldpgdatastays declared, so fresh installs also get an empty, unusedpgdatavolume.stop_grace_period: 2m(kit v2 rule), so 17 and 18 shut down cleanly.You need to: nothing to merge it. Operators who use
--profile postgresshould read PostgreSQL 17 to 18. The move needs about twice the 17 data in free disk, and removingpgdataafterwards is their choice.Detail
Upgrade flow, on
docker compose --profile postgres up -dpostgres-17-dump(17 image, no network) mountspgdataat/var/lib/postgresql/dataandpostgresat/pg18. It skips when the move is done or there is no 17 data. Under Compose v5.7.0,upover a running 17 stack stops 17 first. It refuses when 17 still appears to be running (postmaster.pid) or there is less than 2× the data in free space. Otherwise it starts 17 on a private socket and writespg_dumpalltoupgrade-from-17/dump.sqlatomically.postgres(18) waits for the dump withservice_completed_successfully. Its entrypoint restores the dump into18/docker.part, keeps the 17 roles and password hashes, renames the result to18/dockerand execs the stock entrypoint withpostgres. A failed restore exits non-zero,restart: unless-stoppedretries it, and no cluster appears.Verification record (Major, 2026-11-25)
kslot bash scripts/test-postgres-17-to-18.sh:PASS: docker-compose.yml moves 17 to 18; rollback, rerun, bad dump and fresh install hold, on kita800e026and again on29926441.NEW_COMPOSE=docker-compose.bump.yml(the old file with only the image swapped to 18):FAIL: 18 did not start after the move, rc 1.kjob(k81, exit 0):sqlite normal PASS,sqlite fips PASS.a800e026):FAIL: dump ran beside a live 17, rc 1.kslot, with a throwawaypostgres:18.7-alpine3.24@…container (server_version18.7) removed by a trap. A first run with a longTMPDIRfailed 2 installer tests on the 107-byte Unix socket limit, which is environment, not Postgres. WithTMPDIR=~/.k:PG18 normal: PASS,PG18 fips: PASS.PostgreSQL 18 behaviour changes: this repo declares no
ON DELETE RESTRICTand never matches SQLSTATE23503. It sets no MD5 passwords and has noCOPY … CSVimport.🤖 Generated with Claude Code