fix: allow bounded PostGIS crash recovery
This commit is contained in:
@@ -56,7 +56,10 @@ echo "Starting embedded PostGIS..."
|
||||
postgres_pid="$!"
|
||||
|
||||
echo "Waiting for embedded PostGIS..."
|
||||
for attempt in $(seq 1 60); do
|
||||
# Large persistent PostGIS volumes can require several minutes of crash
|
||||
# recovery after an interrupted container replacement. Keep the wait bounded,
|
||||
# but do not terminate recovery at the former two-minute ceiling.
|
||||
for attempt in $(seq 1 450); do
|
||||
if pg_isready -h 127.0.0.1 -U "$POSTGRES_USER" -d "$POSTGRES_DB" >/dev/null 2>&1; then
|
||||
echo "PostGIS is ready after attempt ${attempt}."
|
||||
break
|
||||
@@ -69,7 +72,7 @@ for attempt in $(seq 1 60); do
|
||||
done
|
||||
|
||||
if ! pg_isready -h 127.0.0.1 -U "$POSTGRES_USER" -d "$POSTGRES_DB" >/dev/null 2>&1; then
|
||||
echo "PostGIS did not become ready."
|
||||
echo "PostGIS did not become ready within 15 minutes."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user