Skip to content

fix(pg_upgrade): root the target binaries so a gc cannot remove them - #2540

Open
brainrake wants to merge 2 commits into
developfrom
martonboros/mpg-1338-root-the-pg-upgrade-target-binaries-against-gc
Open

brainrake wants to merge 2 commits into
developfrom
martonboros/mpg-1338-root-the-pg-upgrade-target-binaries-against-gc

Conversation

@brainrake

@brainrake brainrake commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

initiate.sh downloads the target Postgres with nix-store --realise, which leaves the path without a GC root. pg_upgrade then runs from that path for minutes, and a GC in between can delete the new binaries.

This downloads and roots the path in one step with nix-env --profile /nix/var/nix/profiles/pg-upgrade --set. The timeout and retry loop stay, and the call gains --option stalled-download-timeout 60.

MPG-1338

Refs: MPG-1338

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@brainrake brainrake self-assigned this Oct 8, 2026
@brainrake
brainrake marked this pull request as ready for review October 10, 2026 09:07
@brainrake
brainrake requested a review from a team as a code owner October 10, 2026 09:07
@github-actions

Copy link
Copy Markdown

Package version diff: none (aarch64-linux, x86_64-linux)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant