Compare commits

..

No commits in common. "120280426872b6acb4b42e66c921f5047c1487c6" and "1d479d01508af144b635496e6ae306b35e8a7e4c" have entirely different histories.

View file

@ -113,15 +113,7 @@ log "Container up, mapped to 127.0.0.1:${host_port} (only reachable while this d
log "Waiting for postgres to accept connections (timeout ${READY_TIMEOUT}s)..."
ready=0
for _ in $(seq 1 "$READY_TIMEOUT"); do
# -h 127.0.0.1 is load-bearing, NOT cosmetic. The postgres image runs a
# TEMPORARY server during initialisation, and that server already answers
# "accepting connections" on the unix socket. Probing the socket therefore
# goes green mid-init; the restore starts against the temporary server and
# dies with "FATAL: terminating connection due to administrator command"
# the moment the entrypoint shuts it down to start the real one. The
# temporary server does NOT listen on TCP, so a TCP probe only goes green
# on the real server. Same reasoning, same fix as ci-tradein.yml:137-141.
if docker exec "$CONTAINER" pg_isready -h 127.0.0.1 -U postgres >/dev/null 2>&1; then
if docker exec "$CONTAINER" pg_isready -U postgres >/dev/null 2>&1; then
ready=1
break
fi