Fatal "make check" bug with 8.0 beta 3 under Mac OS 10.3

Started by Reuven M. Lernerover 21 years ago4 messagesbugs
Jump to latest
#1Reuven M. Lerner
reuven@lerner.co.il

I just downloaded and compiled PostgreSQL 8.0 beta 3. The directory and
files are all owned by the "postgres" user, and I compiled as that
user. I configured with:

./configure --prefix=/sw --with-tcl --with-python --with-libs=/sw/lib/
--with-includes=/sw/include/

(/sw is the root of the "fink" hierarchy, analogous in some ways to the
traditional /usr/local path.)

The "make check" log included the following:

creating template1 database in
/Users/reuven/Downloads/postgresql-8.0.0beta3/src
/test/regress/./tmp_check/data/base/1 ... FATAL: could not create
shared memory
segment: Cannot allocate memory
DETAIL: Failed system call was shmget(key=2, size=1163264, 03600).
HINT: This error usually means that PostgreSQL's request for a shared
memory se
gment exceeded available memory or swap space. To reduce the request
size (curre
ntly 1163264 bytes), reduce PostgreSQL's shared_buffers parameter
(currently 50)
and/or its max_connections parameter (currently 10).
The PostgreSQL documentation contains more information about
shared memo
ry configuration.
child process exited with exit code 1
initdb: failed
initdb: data directory
"/Users/reuven/Downloads/postgresql-8.0.0beta3/src/test/r
egress/./tmp_check/data" not removed at user's request

Reuven

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Reuven M. Lerner (#1)
Re: Fatal "make check" bug with 8.0 beta 3 under Mac OS 10.3

"Reuven M. Lerner" <reuven@lerner.co.il> writes:

/test/regress/./tmp_check/data/base/1 ... FATAL: could not create
shared memory
segment: Cannot allocate memory
DETAIL: Failed system call was shmget(key=2, size=1163264, 03600).

OS X has an unreasonably small limit on shared memory size; if you don't
raise it (IIRC you can do this in /etc/rc) then you don't get to have
more than one postmaster at a time.

regards, tom lane

#3Reuven M. Lerner
reuven@lerner.co.il
In reply to: Tom Lane (#2)
Re: Fatal "make check" bug with 8.0 beta 3 under Mac OS 10.3

Tom Lane wrote:

OS X has an unreasonably small limit on shared memory size; if you don't

raise it (IIRC you can do this in /etc/rc) then you don't get to have
more than one postmaster at a time.

OK, I see what you're talking about from looking in /etc/rc. You might
want to put something about this in the installation notes (if it's not
already there), and/or put something in "configure" itself to notify
users of this problem.

Thanks for the response!

Reuven

#4Theodore Petrosky
tedpet5@yahoo.com
In reply to: Reuven M. Lerner (#1)
Re: Fatal "make check" bug with 8.0 beta 3 under Mac OS 10.3

You already have the answer. Of course the solution
has been described on the lists a few times. Open the
file /etc/rc in pico (don't forget to sudo) ( sudo
pico /etc/rc ). scroll down to the system tuning
section and change to look like this.

# System tuning
sysctl -w kern.maxvnodes=$(echo $(sysctl -n
hw.physmem) '33554432 / 512 * 1024 +p'|dc)
sysctl -w kern.sysv.shmmax=16777216
sysctl -w kern.sysv.shmmin=1
sysctl -w kern.sysv.shmmni=32
sysctl -w kern.sysv.shmseg=8
sysctl -w kern.sysv.shmall=65536

These values work well. I don't know if they are
optimal for your system and setup.

Ted
--- "Reuven M. Lerner" <reuven@lerner.co.il> wrote:

I just downloaded and compiled PostgreSQL 8.0 beta
3. The directory and
files are all owned by the "postgres" user, and I
compiled as that
user. I configured with:

./configure --prefix=/sw --with-tcl --with-python
--with-libs=/sw/lib/
--with-includes=/sw/include/

(/sw is the root of the "fink" hierarchy, analogous
in some ways to the
traditional /usr/local path.)

The "make check" log included the following:

creating template1 database in
/Users/reuven/Downloads/postgresql-8.0.0beta3/src
/test/regress/./tmp_check/data/base/1 ... FATAL:
could not create
shared memory
segment: Cannot allocate memory
DETAIL: Failed system call was shmget(key=2,
size=1163264, 03600).
HINT: This error usually means that PostgreSQL's
request for a shared
memory se
gment exceeded available memory or swap space. To
reduce the request
size (curre
ntly 1163264 bytes), reduce PostgreSQL's
shared_buffers parameter
(currently 50)
and/or its max_connections parameter (currently
10).
The PostgreSQL documentation contains more
information about
shared memo
ry configuration.
child process exited with exit code 1
initdb: failed
initdb: data directory

"/Users/reuven/Downloads/postgresql-8.0.0beta3/src/test/r

egress/./tmp_check/data" not removed at user's
request

Reuven

---------------------------(end of
broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com