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

Commitbb7f173

Browse files
committed
Reply-To: Jordi MacDonald <jordi@spartanmedia.com>
There is an error in the configure script when using--with-pgport= that will cause the compiled version ofPostgreSQL to no longer allow connections to thenew port and to treat shared memory improperly.What happens is that if the port is changed, the configurescript defines DEF_PGPORT as "", which atoi() will returnas 0, which makes the IPC_KEY value 0. This then causessemaphores to be allocated, but never released. Postgreseventually returns from semget() with"no space left on device". The source of this error couldeasily be overlooked in version 6.3 since it is possibleto connect via UNIX domain sockets, and having DEF_PGPORTdefined as "0" would not be noticed until TCP was used.
1 parente4135ad commitbb7f173

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎src/configure

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ echo "configure:807: checking setting DEF_PGPORT" >&5
808808
iftest"${with_pgport+set}" =set;then
809809
withval="$with_pgport"
810810
cat>> confdefs.h<<EOF
811-
#define DEF_PGPORT "${DEF_PGPORT}"
811+
#define DEF_PGPORT "${withval}"
812812
EOF
813813
echo"$ac_t""$with_pgport"1>&6
814814
else
@@ -1003,7 +1003,7 @@ fi
10031003

10041004
echo"$ac_t""$ac_cv_prog_gcc"1>&6
10051005

1006-
iftest"$ac_cv_prog_gcc" ="yes";then
1006+
iftest$ac_cv_prog_gcc = yes;then
10071007
GCC=yes
10081008
ac_test_CFLAGS="${CFLAGS+set}"
10091009
ac_save_CFLAGS="$CFLAGS"

‎src/configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ AC_MSG_CHECKING(setting DEF_PGPORT)
230230
AC_ARG_WITH(
231231
pgport,
232232
[ --with-pgport=<portnum> change default startup port ],
233-
AC_DEFINE_UNQUOTED(DEF_PGPORT, "${DEF_PGPORT}") AC_MSG_RESULT($with_pgport),
233+
AC_DEFINE_UNQUOTED(DEF_PGPORT, "${withval}") AC_MSG_RESULT($with_pgport),
234234
AC_DEFINE_UNQUOTED(DEF_PGPORT, "5432") AC_MSG_RESULT(5432)
235235
)
236236

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp