Commit 164c14fe authored by Dan Notestein's avatar Dan Notestein
Browse files

fix: add retry logic to PostgreSQL check in extract-test-cache.sh

HAF service containers may restart PostgreSQL during initialization (e.g.,
after applying CI config or installing extensions). The previous single-shot
pg_isready check could fail if it ran during this brief restart window,
causing the script to unnecessarily delete and re-extract cache data that
was already in use by the running PostgreSQL instance.

Add a retry loop (default 15s timeout, configurable via POSTGRES_CHECK_TIMEOUT)
that checks multiple times before deciding PostgreSQL isn't running. This
prevents race conditions where the script runs right as HAF is restarting
PostgreSQL.
parent e3369dfa
Loading
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment