Skip site navigation (1) Skip section navigation (2)

Re: Fresh build on OS X not working (memory)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gavin Kistner <phrogz(at)mac(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Fresh build on OS X not working (memory)
Date: 2010-04-30 05:42:20
Message-ID: 15253.1272606140@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-admin
Gavin Kistner <phrogz(at)mac(dot)com> writes:
> Mac OS X 10.6.3
> Built and installed PG 8.4.3 from source
> Trying to start the server, I get "could not create shared memory segment: Invalid argument".

OSX is *notoriously* unfriendly about configuring shm parameters.
You look at it sidewise, it doesn't work, and generally won't tell
you why it's refusing to talk to you.  We document a few of the known
constraints in our manual, but I'm sure there are more.

> Slim2:pgsql _postgres$ sysctl -a | grep shm
> kern.sysv.shmmax: 2147483648
> kern.sysv.shmmin: 1
> kern.sysv.shmmni: 32
> kern.sysv.shmseg: 8
> kern.sysv.shmall: 2147483648

Hm.  That shmall setting is not sane at all (remember the units are
pages).  I wonder whether you've forced some internal overflow inside
the kernel.  For comparison, I have these settings on my laptop:

pro:~ tgl$ cat /etc/sysctl.conf 
kern.sysv.shmmax=33554432
kern.sysv.shmmin=1
kern.sysv.shmmni=32
kern.sysv.shmseg=8
kern.sysv.shmall=8192

and PG starts fine for me.

			regards, tom lane

In response to

Responses

pgsql-admin by date

Next:From: Gavin KistnerDate: 2010-04-30 05:58:54
Subject: Re: Fresh build on OS X not working (memory)
Previous:From: Gavin KistnerDate: 2010-04-30 05:32:10
Subject: Fresh build on OS X not working (memory)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group