File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
ansible/files/admin_api_scripts/pg_upgrade_scripts Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -341,7 +341,7 @@ function initiate_upgrade {
341
341
echo " 1.2. Installing flake revision: $NIX_FLAKE_VERSION "
342
342
# shellcheck disable=SC1091
343
343
source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
344
- nix-collect-garbage -d > /tmp/ pg_upgrade-nix-gc.log 2>&1 || true
344
+ nix-collect-garbage -d > " ${PG_UPGRADE_DIR} / pg_upgrade-nix-gc.log" 2>&1 || true
345
345
PG_UPGRADE_BIN_DIR=$( nix build " github:supabase/postgres/${NIX_FLAKE_VERSION} #psql_15/bin" --no-link --print-out-paths --extra-experimental-features nix-command --extra-experimental-features flakes)
346
346
PGSHARENEW=" $PG_UPGRADE_BIN_DIR /share/postgresql"
347
347
fi
@@ -360,10 +360,7 @@ function initiate_upgrade {
360
360
361
361
chown -R postgres:postgres " $PG_UPGRADE_BIN_DIR "
362
362
363
- # upgrade job outputs a log in the cwd; needs write permissions
364
- mkdir -p /tmp/pg_upgrade/
365
- chown -R postgres:postgres /tmp/pg_upgrade/
366
- cd /tmp/pg_upgrade/
363
+ cd " $PG_UPGRADE_DIR "
367
364
368
365
# Fixing erros generated by previous dpkg executions (package upgrades et co)
369
366
echo " 2. Fixing potential errors generated by dpkg"
487
484
# copy sql files generated by pg_upgrade
488
485
echo " 12. Copying sql files generated by pg_upgrade"
489
486
mkdir -p " $MOUNT_POINT /sql"
490
- cp /tmp /pg_upgrade/* .sql " $MOUNT_POINT /sql/" || true
487
+ cp " $PG_UPGRADE_DIR " /pg_upgrade/* .sql " $MOUNT_POINT /sql/" || true
491
488
chown -R postgres:postgres " $MOUNT_POINT /sql/"
492
489
493
490
echo " 13. Cleaning up"
You can’t perform that action at this time.
0 commit comments