8.1beta, SunOS and shmget

From: "Sergey E(dot) Koposov" <math(at)sai(dot)msu(dot)ru>
To: pgsql-hackers(at)postgresql(dot)org
Subject: 8.1beta, SunOS and shmget
Date: 2005-08-29 11:50:45
Message-ID: Pine.LNX.4.44.0508290645290.23457-100000@lnfm1.sai.msu.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

I just found quite a strange behaviour of 8.1beta on SunOS:

uname -a:
SunOS sun46 5.8 Generic_108528-14 sun4u sparc SUNW,Ultra-80
gcc -v:
Reading specs from
/systools/bin/../lib/gcc-lib/sparc-sun-solaris2.7/3.2.1/specs
Configured with: /disk-c/hiller/gcc-3.2.1/configure
--prefix=/systools/misc/gcc/gcc_3.2.1
Thread model: posix
gcc version 3.2.1

The shmmax value is around 1 Mb (and I cannot change it, since I'm not
root on that machine).

It compiles without problems but fails on initdb with the shmget error.
DETAIL: Failed system call was shmget(key=1, size=1957888, 03600)

So, I tried to lower the max_con and number of shared buffers in initdb.c
but it still require too much shared memory:

selecting default max_connections ... 10
selecting default shared_buffers ... 50
DETAIL: Failed system call was shmget(key=1, size=1957888, 03600).

selecting default max_connections ... 10
selecting default shared_buffers ... 20
DETAIL: Failed system call was shmget(key=1, size=1712128, 03600).

selecting default max_connections ... 5
selecting default shared_buffers ... 16
DETAIL: Failed system call was shmget(key=1, size=1613824, 03600).

To me it seems quite strange, since that behaviour does not relate with
the formulae "250 kB + 8.2 kB * shared_buffers + 14.2 kB * max_connections
up to infinity" from documentation.

Actually this is strange too because with 8.0.3 I don't have such a
problems:
With the default settings initdb fails with the:
default: 1130496
selecting default max_connections ... 10
selecting default shared_buffers ... 50
DETAIL: Failed system call was shmget(key=1, size=1130496, 03600).

but when I set number of connections in initdb.c to 15 and number of
shared buffers to 30, the initdb works and make check works fine too.

So, are the shared memory requirements increased for 8.1 ? or I just see a
bug?

With Best regards,
Sergey

Output of configure:

./configure --prefix=$PWD/../pg_inst/

checking build system type... sparc-sun-solaris2.8
checking host system type... sparc-sun-solaris2.8
checking which template to use... solaris
checking whether to build with 64-bit integer date/time support... no
checking whether NLS is wanted... no
checking for default port number... 5432
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking if gcc supports -Wdeclaration-after-statement... no
checking if gcc supports -Wold-style-definition... no
checking if gcc supports -Wendif-labels... no
checking if gcc supports -fno-strict-aliasing... yes
configure: using CFLAGS=-O2 -Wall -Wmissing-prototypes -Wpointer-arith
-fno-str
checking whether the C compiler still works... yes
checking how to run the C preprocessor... gcc -E
checking allow thread-safe client libraries... no
checking whether to build with Tcl... no
checking whether to build Perl modules... no
checking whether to build Python modules... no
checking whether to build with Kerberos 5 support... no
checking whether to build with PAM support... no
checking whether to build with Bonjour support... no
checking whether to build with OpenSSL support... no
checking for egrep... egrep
configure: using CPPFLAGS=-I/systools/include
configure: using LDFLAGS=-L/systools/lib/
checking for gawk... gawk
checking for flex... /systools/bin/flex
checking whether ln -s works... yes
checking for ld used by GCC... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking for ranlib... ranlib
checking for lorder... lorder
checking for tar... /bin/tar
checking for strip... strip
checking whether it is possible to strip libraries... no
checking for bison... bison -y
configure: WARNING:
*** If you are going to modify the grammar files or build from CVS, the
install
*** version of Bison is too old. Bison version 1.875 or later is
required.
checking for perl... /bin/perl
checking for main in -lbsd... no
checking for setproctitle in -lutil... no
checking for main in -lm... yes
checking for main in -ldl... yes
checking for main in -lnsl... yes
checking for main in -lsocket... yes
checking for main in -lipc... no
checking for main in -lIPC... no
checking for main in -llc... no
checking for main in -ldld... no
checking for main in -lld... no
checking for main in -lcompat... no
checking for main in -lBSD... no
checking for main in -lgen... yes
checking for main in -lPW... no
checking for main in -lresolv... yes
checking for library containing getopt_long... no
checking for main in -lunix... no
checking for library containing crypt... none required
checking for library containing fdatasync... -lrt
checking for shmget in -lcygipc... no
checking for readline... yes (-lreadline -ltermcap)
checking for inflate in -lz... yes
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... no
checking for unistd.h... yes
checking crypt.h usability... yes
checking crypt.h presence... yes
checking for crypt.h... yes
checking dld.h usability... no
checking dld.h presence... no
checking for dld.h... no
checking endian.h usability... no
checking endian.h presence... no
checking for endian.h... no
checking fp_class.h usability... no
checking fp_class.h presence... no
checking for fp_class.h... no
checking getopt.h usability... no
checking getopt.h presence... no
checking for getopt.h... no
checking ieeefp.h usability... yes
checking ieeefp.h presence... yes
checking for ieeefp.h... yes
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/pstat.h usability... no
checking sys/pstat.h presence... no
checking for sys/pstat.h... no
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/sem.h usability... yes
checking sys/sem.h presence... yes
checking for sys/sem.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/shm.h usability... yes
checking sys/shm.h presence... yes
checking for sys/shm.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/un.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking wctype.h usability... yes
checking wctype.h presence... yes
checking for wctype.h... yes
checking kernel/OS.h usability... no
checking kernel/OS.h presence... no
checking for kernel/OS.h... no
checking kernel/image.h usability... no
checking kernel/image.h presence... no
checking for kernel/image.h... no
checking SupportDefs.h usability... no
checking SupportDefs.h presence... no
checking for SupportDefs.h... no
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for working volatile... yes
checking for __func__... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... no
checking for tzname... yes
checking for union semun... no
checking for struct sockaddr_un... yes
checking for struct sockaddr_storage... yes
checking for struct sockaddr_storage.ss_family... yes
checking for struct sockaddr_storage.__ss_family... no
checking for struct sockaddr_storage.ss_len... no
checking for struct sockaddr_storage.__ss_len... no
checking for struct sockaddr.sa_len... no
checking for struct addrinfo... yes
checking for struct cmsgcred... no
checking for struct fcred... no
checking for struct sockcred... no
checking for struct option... no
checking for z_streamp... yes
checking for int timezone... yes
checking types of arguments for accept()... int, int, struct sockaddr *,
int *
checking whether gettimeofday takes only one argument... no
checking for cbrt... yes
checking for dlopen... yes
checking for fcvt... yes
checking for fdatasync... yes
checking for getpeereid... no
checking for memmove... yes
checking for poll... yes
checking for pstat... no
checking for readlink... yes
checking for setproctitle... no
checking for setsid... yes
checking for sigprocmask... yes
checking for symlink... yes
checking for sysconf... yes
checking for towlower... yes
checking for utime... yes
checking for utimes... yes
checking for waitpid... yes
checking for wcstombs... yes
checking whether fdatasync is declared... yes
checking for struct sockaddr_in6... yes
checking for PS_STRINGS... no
checking for snprintf... yes
checking for vsnprintf... yes
checking whether snprintf is declared... yes
checking whether vsnprintf is declared... yes
checking for isinf... no
checking for fpclass... yes
checking for crypt... yes
checking for fseeko... yes
checking for getopt... yes
checking for getrusage... yes
checking for inet_aton... yes
checking for random... yes
checking for rint... yes
checking for srandom... yes
checking for strdup... yes
checking for strerror... yes
checking for strtol... yes
checking for strtoul... yes
checking for unsetenv... no
checking for getaddrinfo... yes
checking for rl_completion_append_character... yes
checking for rl_completion_matches... no
checking for rl_filename_completion_function... no
checking for replace_history_entry... yes
checking for finite... yes
checking for sigsetjmp... yes
checking for syslog... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for optreset... no
checking for strtoll... yes
checking for strtoull... yes
checking for atexit... yes
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for fseeko... (cached) yes
checking test program... ok
checking whether long int is 64 bits... no
checking whether long long int is 64 bits... yes
checking snprintf format for long long int... %lld
checking for unsigned long... yes
checking size of unsigned long... 4
checking for size_t... yes
checking size of size_t... 4
checking for short... yes
checking alignment of short... 2
checking for int... yes
checking alignment of int... 4
checking for long... yes
checking alignment of long... 4
checking for long long int... yes
checking alignment of long long int... 8
checking for double... yes
checking alignment of double... 8
checking for int8... no
checking for uint8... no
checking for int64... no
checking for sig_atomic_t... yes
checking for POSIX signal interface... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for _LARGE_FILES value needed for large files... no
checking for working memcmp... yes
checking for onsgmls... no
checking for nsgmls... no
checking for openjade... no
checking for jade... no
checking for DocBook V4.2... no
checking for DocBook stylesheets... no
checking for collateindex.pl... no
checking for sgmlspl... no
configure: creating ./config.status
config.status: creating GNUmakefile
config.status: creating src/Makefile.global
config.status: creating src/include/pg_config.h
config.status: src/include/pg_config.h is unchanged
config.status: linking ./src/backend/port/tas/dummy.s to
src/backend/port/tas.s
config.status: linking ./src/backend/port/dynloader/solaris.c to
src/backend/po
config.status: linking ./src/backend/port/sysv_sema.c to
src/backend/port/pg_se
config.status: linking ./src/backend/port/sysv_shmem.c to
src/backend/port/pg_s
config.status: linking ./src/backend/port/dynloader/solaris.h to
src/include/dy
config.status: linking ./src/include/port/solaris.h to
src/include/pg_config_os
config.status: linking ./src/makefiles/Makefile.solaris to
src/Makefile.port

*****************************************************
Sergey E. Koposov
Max-Planck Institut fuer Astronomie
Web: http://lnfm1.sai.msu.ru/~math
E-mail: math(at)sai(dot)msu(dot)ru

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Knut P Lehre 2005-08-29 12:09:22 Re: SSL client crt verification
Previous Message Knut P Lehre 2005-08-29 11:30:34 Re: SSL client crt verification