56 lines
1.6 KiB
Diff
56 lines
1.6 KiB
Diff
|
Back-patch upstream fix to suppress creation of postmaster's TCP socket
|
||
|
during pg_upgrade testing. This will be in 9.2.3 and later.
|
||
|
|
||
|
|
||
|
diff -Naur postgresql-9.2.2.orig/contrib/pg_upgrade/test.sh postgresql-9.2.2/contrib/pg_upgrade/test.sh
|
||
|
--- postgresql-9.2.2.orig/contrib/pg_upgrade/test.sh 2012-12-03 15:16:10.000000000 -0500
|
||
|
+++ postgresql-9.2.2/contrib/pg_upgrade/test.sh 2013-01-03 17:33:45.581567466 -0500
|
||
|
@@ -17,6 +17,13 @@
|
||
|
|
||
|
testhost=`uname -s`
|
||
|
|
||
|
+case $testhost in
|
||
|
+ MINGW*) LISTEN_ADDRESSES="localhost" ;;
|
||
|
+ *) LISTEN_ADDRESSES="" ;;
|
||
|
+esac
|
||
|
+
|
||
|
+POSTMASTER_OPTS="-F -c listen_addresses=$LISTEN_ADDRESSES"
|
||
|
+
|
||
|
temp_root=$PWD/tmp_check
|
||
|
|
||
|
if [ "$1" = '--install' ]; then
|
||
|
@@ -71,10 +78,11 @@
|
||
|
rm -rf "$logdir"
|
||
|
mkdir "$logdir"
|
||
|
|
||
|
+# enable echo so the user can see what is being executed
|
||
|
set -x
|
||
|
|
||
|
$oldbindir/initdb
|
||
|
-$oldbindir/pg_ctl start -l "$logdir/postmaster1.log" -w
|
||
|
+$oldbindir/pg_ctl start -l "$logdir/postmaster1.log" -o "$POSTMASTER_OPTS" -w
|
||
|
if "$MAKE" -C "$oldsrc" installcheck; then
|
||
|
pg_dumpall -f "$temp_root"/dump1.sql || pg_dumpall1_status=$?
|
||
|
if [ "$newsrc" != "$oldsrc" ]; then
|
||
|
@@ -117,7 +125,7 @@
|
||
|
|
||
|
pg_upgrade -d "${PGDATA}.old" -D "${PGDATA}" -b "$oldbindir" -B "$bindir"
|
||
|
|
||
|
-pg_ctl start -l "$logdir/postmaster2.log" -w
|
||
|
+pg_ctl start -l "$logdir/postmaster2.log" -o "$POSTMASTER_OPTS" -w
|
||
|
|
||
|
case $testhost in
|
||
|
MINGW*) cmd /c analyze_new_cluster.bat ;;
|
||
|
@@ -126,6 +134,11 @@
|
||
|
|
||
|
pg_dumpall -f "$temp_root"/dump2.sql || pg_dumpall2_status=$?
|
||
|
pg_ctl -m fast stop
|
||
|
+
|
||
|
+# no need to echo commands anymore
|
||
|
+set +x
|
||
|
+echo
|
||
|
+
|
||
|
if [ -n "$pg_dumpall2_status" ]; then
|
||
|
echo "pg_dumpall of post-upgrade database cluster failed"
|
||
|
exit 1
|