Skip to content

fix: run nix-gc before pg_upgrade #1189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 10, 2024
Merged

fix: run nix-gc before pg_upgrade #1189

merged 1 commit into from
Sep 10, 2024

Conversation

pcnc
Copy link
Member

@pcnc pcnc commented Sep 9, 2024

No description provided.

@pcnc pcnc requested a review from a team as a code owner September 9, 2024 15:44
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --no-confirm \
--extra-conf "substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com" \
--extra-conf "trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
if [ ! -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: && with above into one condition?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would unfortunately never run :[

The nix binary is generally located in /root/.nix-profile/bin - with the path provided by sourcing /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh

In truth, if /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh doesn't exist, neither will /root/.nix-profile/bin/nix, which makes ! command -v nix > /dev/null kind of superfluous.

Will remove the secondary check once we figure out the avenue of hosting the installer ourselves, as I'm not sure how stable the /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh path is at the moment

@pcnc pcnc merged commit 90d602a into develop Sep 10, 2024
9 checks passed
@pcnc pcnc deleted the pcnc/nix-gc-before-upgrade branch September 10, 2024 10:04
damonrand pushed a commit to cepro/postgres that referenced this pull request Jun 15, 2025
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.

3 participants