This suggested patch makes sure that the regression script can actually
connect to the database rather than falling through after 60 seconds, as
discussed on -hackers.
cheers
andrew
Index: pg_regress.sh
===================================================================
RCS file: /cvsroot/pgsql/src/test/regress/pg_regress.sh,v
retrieving revision 1.64
diff -c -r1.64 pg_regress.sh
*** pg_regress.sh 5 Jan 2006 03:01:38 -0000 1.64
--- pg_regress.sh 18 Jun 2006 22:19:53 -0000
***************
*** 457,471 ****
sleep 1
done
! if kill -0 $postmaster_pid >/dev/null 2>&1
then
echo "running on port $PGPORT with pid $postmaster_pid"
! else
echo
echo "$me: postmaster did not start"
echo "Examine $LOGDIR/postmaster.log for the reason."
echo
(exit 2); exit
fi
else # not temp-install
--- 457,482 ----
sleep 1
done
! kill -0 $postmaster_pid >/dev/null 2>&1
! running=$?
! if test $running -eq 0 -a $i -lt $max
then
echo "running on port $PGPORT with pid $postmaster_pid"
! elif test $running -neq 0
! then
! # postmaster is not running
echo
echo "$me: postmaster did not start"
echo "Examine $LOGDIR/postmaster.log for the reason."
echo
(exit 2); exit
+ else
+ # postmaster is running but we can't connect
+ echo
+ echo "$me: postmaster started but did not accept connections after $max seconds"
+ echo
+ kill $postmaster_pid
+ (exit 2); exit
fi
else # not temp-install