File tree Expand file tree Collapse file tree 1 file changed +0
-23
lines changed
jobs/postgres-10/templates Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Original file line number Diff line number Diff line change 4848
4949if [[ -f ${STORE_DIR} /fresh ]] ; then
5050 if [[ -d ${STORE_DIR_OLD} ]] ; then
51- echo " checking status of postgres-9.4..."
52- if ! " ${PACKAGE_DIR_OLD} /bin/pg_controldata" " ${STORE_DIR_OLD} " | grep -E " Database cluster state:\s+shut down" ; then
53- echo " postgres-9.4 did not shut down cleanly"
54- echo " repairing postgres-9.4. cluster state..."
55-
56- su - vcap -c " ${PACKAGE_DIR_OLD} /bin/postgres -D ${STORE_DIR_OLD} " &
57- postgres_pid=$!
58-
59- count=0
60- while ! " ${PACKAGE_DIR_OLD} /bin/pg_isready" -t 30 -U postgres; do
61- echo " waiting for postgres-9.4 to start..."
62- sleep 1
63- count=$(( count + 1 ))
64- if [ $count -ge 120 ]; then
65- echo " timed out waiting for postgres-9.4 to start"
66- exit 1
67- fi
68- done
69-
70- kill " ${postgres_pid} "
71- wait " ${postgres_pid} "
72- fi
73-
7451 echo " copying contents of postgres-9.4 to postgres-10 for postgres upgrade..."
7552 su - vcap -c " ${PACKAGE_DIR} /bin/pg_upgrade \
7653 --old-bindir=${PACKAGE_DIR_OLD} /bin \
You can’t perform that action at this time.
0 commit comments