Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions integration/copy_data/retry_test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cleanup() {
kill "${PGDOG_PID}" 2>/dev/null || true
wait "${PGDOG_PID}" 2>/dev/null || true
fi
cd "${COMPOSE_DIR}" && docker compose down 2>/dev/null || true
cd "${COMPOSE_DIR}" && docker compose down -v 2>/dev/null || true
}
trap cleanup EXIT

Expand Down Expand Up @@ -307,5 +307,5 @@ kill "${PGDOG_PID}" 2>/dev/null || true
wait "${PGDOG_PID}" 2>/dev/null || true
PGDOG_PID=""

docker compose down
docker compose down -v
popd
4 changes: 2 additions & 2 deletions integration/load_balancer/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ echo "[load_balancer] Using PGDOG_BIN=${PGDOG_BIN}"
echo "[load_balancer] LLVM_PROFILE_FILE=${LLVM_PROFILE_FILE}"
echo "[load_balancer] PGDOG_PLUGIN_FEATURES=${PGDOG_PLUGIN_FEATURES:-}"

docker compose down 2>/dev/null || true
docker compose down -v 2>/dev/null || true

for p in 45000 45001 45002; do
container=$(docker ps -q --filter "publish=${p}")
Expand Down Expand Up @@ -73,5 +73,5 @@ fi

stop_pgdog

docker compose down
docker compose down -v
popd
4 changes: 2 additions & 2 deletions integration/prefer_primary/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export PGPASSWORD=postgres

echo "[prefer_primary] Using PGDOG_BIN=${PGDOG_BIN:-}"

docker compose down 2>/dev/null || true
docker compose down -v 2>/dev/null || true

for p in 45000 45001 45002; do
container=$(docker ps -q --filter "publish=${p}")
Expand Down Expand Up @@ -55,5 +55,5 @@ deactivate

stop_pgdog

docker compose down
docker compose down -v
popd
6 changes: 3 additions & 3 deletions integration/resharding/repro_deadlock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ cleanup() {
trap cleanup EXIT INT TERM
pushd "${SCRIPT_DIR}" >/dev/null

docker compose down && docker compose up -d
docker compose down -v && docker compose up -d
for port in 15432 15433 15434 15435; do
until PGPASSWORD=pgdog pg_isready -h 127.0.0.1 -p "${port}" -U pgdog -d postgres -q; do
sleep 1
Expand Down Expand Up @@ -83,7 +83,7 @@ dump_deadlock_diagnostics() {
"SELECT slot_name, active, confirmed_flush_lsn, pg_current_wal_lsn() - confirmed_flush_lsn AS lag_bytes FROM pg_replication_slots" || true
done
kill -TERM "${PGDOG_PID}" 2>/dev/null; wait "${PGDOG_PID}" 2>/dev/null || true
docker compose down
docker compose down -v
exit 1
}

Expand Down Expand Up @@ -158,5 +158,5 @@ done

echo "OK — no deadlock observed (run again if flaky)"
kill -TERM "${PGDOG_PID}" 2>/dev/null; wait "${PGDOG_PID}" 2>/dev/null || true
docker compose down
docker compose down -v
exit 0
2 changes: 1 addition & 1 deletion integration/resharding/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
# Safety net: docker compose down and any stray pgdog processes are cleaned up
# on exit even if a scenario is interrupted mid-flight by timeout or signal.
cleanup() {
(cd "${SCRIPT_DIR}" && docker compose down >/dev/null 2>&1 || true)
(cd "${SCRIPT_DIR}" && docker compose down -v >/dev/null 2>&1 || true)
}
trap cleanup EXIT INT TERM

Expand Down
4 changes: 2 additions & 2 deletions integration/resharding/shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ cleanup() {
kill -TERM "${MIGRATION_PID:-}" 2>/dev/null || true
kill -TERM "${PGBENCH_PID:-}" 2>/dev/null || true
kill -TERM "${PGDOG_PID:-}" 2>/dev/null || true
(cd "${SCRIPT_DIR}" && docker compose down) || true
(cd "${SCRIPT_DIR}" && docker compose down -v) || true

# Signal every process in this script's process group except ourselves.
pkill -TERM -P $$ 2> /dev/null || true
Expand Down Expand Up @@ -132,7 +132,7 @@ run_finished_admin_task() {

initialize_resharding() {
pushd "${SCRIPT_DIR}"
docker compose down && docker compose up -d
docker compose down -v && docker compose up -d

# Give it a second to boot up.
# It restarts the DB during initialization.
Expand Down
4 changes: 2 additions & 2 deletions integration/tls/backend/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pg_psql() {

cleanup() {
stop_pgdog
docker compose -f "${SCRIPT_DIR}/docker-compose.yml" down > /dev/null 2>&1 || true
docker compose -f "${SCRIPT_DIR}/docker-compose.yml" down -v > /dev/null 2>&1 || true
}
trap cleanup EXIT
# cleanup already stops PgDog; keep run_pgdog from replacing this trap
Expand All @@ -57,7 +57,7 @@ mkdir -p "${CERTS_DIR}"
cp ${SCRIPT_DIR}/../server.crt ${SCRIPT_DIR}/../server.key ${SCRIPT_DIR}/../ca.crt "${CERTS_DIR}/"
chmod 644 "${CERTS_DIR}"/*

docker compose -f "${SCRIPT_DIR}/docker-compose.yml" down > /dev/null 2>&1 || true
docker compose -f "${SCRIPT_DIR}/docker-compose.yml" down -v > /dev/null 2>&1 || true
docker compose -f "${SCRIPT_DIR}/docker-compose.yml" up -d

echo "Waiting for Postgres"
Expand Down
Loading