Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit78a5e73

Browse files
committed
Prevent creation of postmaster's TCP socket during pg_upgrade testing.
On non-Windows machines, we use the Unix socket for connections to testpostmasters, so there is no need to create a TCP socket. Furthermore,doing so causes failures due to port conflicts if two builds are carriedout concurrently on one machine. (If the builds are done in differentchroots, which is standard practice at least in Red Hat distros, thereis no risk of conflict on the Unix socket.) Suppressing the TCP socketby setting listen_addresses to empty has long been standard practicefor pg_regress, and pg_upgrade knows about this too ... but pg_upgrade'stest.sh didn't get the memo.Back-patch to 9.2, and also sync the 9.2 version of the script with HEADas much as practical.
1 parentb0daba5 commit78a5e73

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

‎contrib/pg_upgrade/test.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ export PGPORT
1717

1818
testhost=`uname -s`
1919

20+
case$testhostin
21+
MINGW*)LISTEN_ADDRESSES="localhost" ;;
22+
*)LISTEN_ADDRESSES="" ;;
23+
esac
24+
25+
POSTMASTER_OPTS="-F -c listen_addresses=$LISTEN_ADDRESSES"
26+
2027
temp_root=$PWD/tmp_check
2128

2229
if ["$1"='--install' ];then
@@ -75,7 +82,7 @@ mkdir "$logdir"
7582
set -x
7683

7784
$oldbindir/initdb -N
78-
$oldbindir/pg_ctl start -l"$logdir/postmaster1.log" -o'-F' -w
85+
$oldbindir/pg_ctl start -l"$logdir/postmaster1.log" -o"$POSTMASTER_OPTS" -w
7986
if"$MAKE" -C"$oldsrc" installcheck;then
8087
pg_dumpall -f"$temp_root"/dump1.sql|| pg_dumpall1_status=$?
8188
if ["$newsrc"!="$oldsrc" ];then
@@ -118,7 +125,7 @@ initdb -N
118125

119126
pg_upgrade -d"${PGDATA}.old" -D"${PGDATA}" -b"$oldbindir" -B"$bindir"
120127

121-
pg_ctl start -l"$logdir/postmaster2.log" -o'-F' -w
128+
pg_ctl start -l"$logdir/postmaster2.log" -o"$POSTMASTER_OPTS" -w
122129

123130
case$testhostin
124131
MINGW*)cmd /c analyze_new_cluster.bat ;;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp