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