Thread: make check fails on OS X 10.6.2

make check fails on OS X 10.6.2

From
Tim Hart
Date:
All,

I've been installing postgres from source on os x for years, but I haven't generally run 'make check' before I install.
Idon't feel that running 'make check' is terribly necessary in this case - it's a personal sandbox on my laptop, with
noproduction value. Regardless, I realize that it's beneficial, so I took the extra time today, and ran across this
problem.

I've got 8_4_STABLE checked out from CVS, and I've run configure as follows:

./configure --with-bonjour --with-python --with-perl

Configure completed, and 'make' ran successfully.

The relevant output from 'make check' is:

./pg_regress --inputdir=. --dlpath=. --multibyte=SQL_ASCII --load-language=plpgsql  --temp-install=./tmp_check
--top-builddir=../../..--schedule=./parallel_schedule   
============== creating temporary installation        ==============
============== initializing database system           ==============

pg_regress: initdb failed
Examine /Users/thart/projects/pgsql/src/test/regress/log/initdb.log for the reason.
Command was: "/Users/thart/projects/pgsql/src/test/regress/./tmp_check/install//usr/local/pgsql/bin/initdb" -D
"/Users/thart/projects/pgsql/src/test/regress/./tmp_check/data"-L
"/Users/thart/projects/pgsql/src/test/regress/./tmp_check/install//usr/local/pgsql/share"--noclean >
"/Users/thart/projects/pgsql/src/test/regress/log/initdb.log"2>&1 

And the contents of src/test/regress/log/initdb.log is:

creating directory /Users/thart/projects/pgsql/src/test/regress/./tmp_check/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 10
selecting default shared_buffers ... 400kB
creating configuration files ... ok
creating template1 database in /Users/thart/projects/pgsql/src/test/regress/./tmp_check/data/base/1 ... FATAL:  could
notcreate shared memory segment: Cannot allocate memory 
DETAIL:  Failed system call was shmget(key=1, size=1613824, 03600).
HINT:  This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory or swap


initdb can and does create a valid database cluster when run by itself, and so far I haven't had any issues with 8.4
duringvery casual use. 

Tim




Re: make check fails on OS X 10.6.2

From
Tom Lane
Date:
Tim Hart <tjhart@me.com> writes:
> creating template1 database in /Users/thart/projects/pgsql/src/test/regress/./tmp_check/data/base/1 ... FATAL:  could
notcreate shared memory segment: Cannot allocate memory 
> DETAIL:  Failed system call was shmget(key=1, size=1613824, 03600).
> HINT:  This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory or
swap 

Were you running a live PG instance on the box at the same time?  OS X's
default SHMMAX is small enough that PG will eat all of it by default,
meaning that attempting to start a second postmaster on the box will
fail.

There isn't any amazingly good reason to have SHMMAX so small, so the
best answer is to configure it higher.  See the PG documentation about
configuring kernel settings for details --- OS X is a bit picky about
how to do it.

            regards, tom lane

Re: make check fails on OS X 10.6.2

From
Tim Hart
Date:
On Dec 16, 2009, at 3:16 PM, Tom Lane wrote:

> Were you running a live PG instance on the box at the same time?  OS X's
> default SHMMAX is small enough that PG will eat all of it by default,
> meaning that attempting to start a second postmaster on the box will
> fail.

Yeah - I was.

I stopped my live instance, reran 'make check', and make check passed.

Thanks for the pointers.

Tim Hart
Software Consultant
615-713-9956 :cell
tjhart :AIM
thart@me.com