Yet another issue with pg_upgrade vs unix_socket_directories
От | Tom Lane |
---|---|
Тема | Yet another issue with pg_upgrade vs unix_socket_directories |
Дата | |
Msg-id | 25656.1346706015@sss.pgh.pa.us обсуждение исходный текст |
Ответы |
Re: Yet another issue with pg_upgrade vs unix_socket_directories
|
Список | pgsql-hackers |
I went back for another try at building the Fedora packages with 9.2 branch tip ... and it still failed at pg_upgrade's "make check". The reason for this is that test.sh starts a couple of random postmasters, and those postmasters expect to put their sockets in the configured default location (which is now /var/run/postgresql on Fedora), and that's not there in a minimal build environment. I hacked it up with the attached quick-and-dirty patch, but I wonder if anyone's got a better idea. regards, tom lane diff --git a/contrib/pg_upgrade/test.sh b/contrib/pg_upgrade/test.sh index 31e30af..c00aa98 100644 *** a/contrib/pg_upgrade/test.sh --- b/contrib/pg_upgrade/test.sh *************** logdir=$PWD/log *** 60,69 **** rm -rf "$logdir" mkdir "$logdir" set -x $oldbindir/initdb ! $oldbindir/pg_ctl start -l "$logdir/postmaster1.log" -w if "$MAKE" -C "$oldsrc" installcheck; then pg_dumpall >"$temp_root"/dump1.sql || pg_dumpall1_status=$? if [ "$newsrc" != "$oldsrc" ]; then --- 60,73 ---- rm -rf "$logdir" mkdir "$logdir" + # we want the Unix sockets in $temp_root + PGHOST=$temp_root + export PGHOST + set -x $oldbindir/initdb ! $oldbindir/pg_ctl start -l "$logdir/postmaster1.log" -o "-c unix_socket_directories='$PGHOST'" -w if "$MAKE" -C "$oldsrc" installcheck; then pg_dumpall >"$temp_root"/dump1.sql || pg_dumpall1_status=$? if [ "$newsrc" != "$oldsrc" ]; then *************** initdb *** 106,112 **** pg_upgrade -d "${PGDATA}.old" -D "${PGDATA}" -b "$oldbindir" -B "$bindir" ! pg_ctl start -l "$logdir/postmaster2.log" -w sh ./analyze_new_cluster.sh pg_dumpall >"$temp_root"/dump2.sql || pg_dumpall2_status=$? pg_ctl -m fast stop --- 110,116 ---- pg_upgrade -d "${PGDATA}.old" -D "${PGDATA}" -b "$oldbindir" -B "$bindir" ! pg_ctl start -l "$logdir/postmaster2.log" -o "-c unix_socket_directories='$PGHOST'" -w sh ./analyze_new_cluster.sh pg_dumpall >"$temp_root"/dump2.sql || pg_dumpall2_status=$? pg_ctl -m fast stop
В списке pgsql-hackers по дате отправления: