diff options
author | Marc G. Fournier <scrappy@hub.org> | 1998-03-15 08:15:46 +0000 |
---|---|---|
committer | Marc G. Fournier <scrappy@hub.org> | 1998-03-15 08:15:46 +0000 |
commit | bb7f173c0c07db2973e4b35286560ca8cc01d3a1 (patch) | |
tree | 78ca6a3a86c6f0521e5da9a7bccb73bbd65524e4 | |
parent | e4135ad17e51fa4e5b884c76cff8608e219fa2c7 (diff) | |
download | postgresql-bb7f173c0c07db2973e4b35286560ca8cc01d3a1.tar.gz postgresql-bb7f173c0c07db2973e4b35286560ca8cc01d3a1.zip |
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 of
PostgreSQL to no longer allow connections to the
new port and to treat shared memory improperly.
What happens is that if the port is changed, the configure
script defines DEF_PGPORT as "", which atoi() will return
as 0, which makes the IPC_KEY value 0. This then causes
semaphores to be allocated, but never released. Postgres
eventually returns from semget() with
"no space left on device". The source of this error could
easily be overlooked in version 6.3 since it is possible
to connect via UNIX domain sockets, and having DEF_PGPORT
defined as "0" would not be noticed until TCP was used.
-rwxr-xr-x | src/configure | 4 | ||||
-rw-r--r-- | src/configure.in | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/configure b/src/configure index c9ed79c8f5a..56d4bf5b198 100755 --- a/src/configure +++ b/src/configure @@ -808,7 +808,7 @@ echo "configure:807: checking setting DEF_PGPORT" >&5 if test "${with_pgport+set}" = set; then withval="$with_pgport" cat >> confdefs.h <<EOF -#define DEF_PGPORT "${DEF_PGPORT}" +#define DEF_PGPORT "${withval}" EOF echo "$ac_t""$with_pgport" 1>&6 else @@ -1003,7 +1003,7 @@ fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 -if test "$ac_cv_prog_gcc" = "yes"; then +if test $ac_cv_prog_gcc = yes; then GCC=yes ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" diff --git a/src/configure.in b/src/configure.in index cdca6b643e4..b5233efebb5 100644 --- a/src/configure.in +++ b/src/configure.in @@ -230,7 +230,7 @@ AC_MSG_CHECKING(setting DEF_PGPORT) AC_ARG_WITH( pgport, [ --with-pgport=<portnum> change default startup port ], - AC_DEFINE_UNQUOTED(DEF_PGPORT, "${DEF_PGPORT}") AC_MSG_RESULT($with_pgport), + AC_DEFINE_UNQUOTED(DEF_PGPORT, "${withval}") AC_MSG_RESULT($with_pgport), AC_DEFINE_UNQUOTED(DEF_PGPORT, "5432") AC_MSG_RESULT(5432) ) |