From 205b30e24d22fc9f3ff0ac4055ebacbef06aa10d Mon Sep 17 00:00:00 2001 From: weichen Date: Mon, 12 Oct 2026 15:17:20 +0000 Subject: [PATCH] Put the restored PostgreSQL socket on a short path Why: The restored postmaster refused to start because the results-directory socket path exceeded the 107-byte Unix socket limit. Evidence: restore/postgres.log from backup-20261012-150713 says the socket path is too long (SELF). bash -n passed. Impact: The restored instance listens on /tmp/u7bk-18997, and cleanup removes that directory. Refs: feature/u7-ops-drills Co-authored-by: Cursor --- tests/ops/run_backup_drill.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/ops/run_backup_drill.sh b/tests/ops/run_backup_drill.sh index 80385295..292b4902 100755 --- a/tests/ops/run_backup_drill.sh +++ b/tests/ops/run_backup_drill.sh @@ -57,6 +57,7 @@ cleanup() { "$PG_CTL" -D "$RESTORE_PG" stop -m fast >/dev/null 2>&1 || true rm -rf "$RESTORE_PG" fi + rm -rf /tmp/u7bk-18997 if [[ -n "$ASIDE" && -d "$ASIDE" ]]; then rm -rf "$ASIDE"; fi if [[ "$OWNED" -eq 1 ]]; then ops_pg_remove "$ROOT" "$NAME" || true; fi exit "$ec" @@ -210,7 +211,8 @@ ops_kill_checked "$APP_PIDFILE" "127.0.0.1:$APP_PORT" TERM || true echo "[backup] restore to new data directory on $RESTORE_PG_PORT" RESTORE_PG="$RESULTS/restore/pgdata" -mkdir -p "$RESTORE_PG" "$RESULTS/restore/sock" +mkdir -p "$RESTORE_PG" /tmp/u7bk-18997 +chmod 700 /tmp/u7bk-18997 cp -a "$BASE/." "$RESTORE_PG/" cat >>"$RESTORE_PG/postgresql.auto.conf" <