Skip to content

Commit 8cc603b

Browse files
committed
fix: use pg socket connection
1 parent c93d515 commit 8cc603b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/workers/crunchy_bridge_restore.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,9 @@ done
292292
# 8. Clean up Crunchy Bridge internal schemas and extensions
293293
log "Cleaning up schemas and extensions..."
294294

295-
sudo -u postgres ${PG_BIN}/psql -p ${PG_PORT} -h 127.0.0.1 -d ${DATABASE_NAME} << 'EOSQL'
295+
# Use Unix socket connection (no -h flag) to leverage peer authentication
296+
# This avoids needing the postgres password from the restored database
297+
sudo -u postgres ${PG_BIN}/psql -p ${PG_PORT} -d ${DATABASE_NAME} << 'EOSQL'
296298
DROP EXTENSION IF EXISTS crunchy_pooler CASCADE;
297299
EOSQL
298300

0 commit comments

Comments
 (0)