The default allocation of shared memory on mac os x is a bit small from
/etc/rc: sysctl -w kern.sysv.shmmax=4194304

I ran into a problem when I tried to do a make test on the distribution,
there is not enought shared memory for two instances.

I googled and found an ipcs package that I was able to compile with just
a little bit of finagling here is the output:

macjerry:/Library/StartupItems root# ipcs -b
SVID messages facility not configured in the system
Shared Memory:
T     ID     KEY        MODE       OWNER    GROUP  SEGSZ
m  65536    5432001 --rw------- postgres    staff 3809280

Semaphores:
T     ID     KEY        MODE       OWNER    GROUP NSEMS

You might want to increase shmmax in /etc/rc

==Jerry

On Mar 22, 2004, at 4:02 PM, Tom Lane wrote:

John Siracusa <[EMAIL PROTECTED]> writes:
and then restarted. Now it works, but I'm not sure if it was the change in
settings or the restart that fixed it. Obviously I had to restart to make
the changes take effect, but my theory before I bit the bullet and restarted
was that some stale shared memory was lurking, making too little available
for Postgres.

I was wondering about that as I read your message, but my recollection is that you get a different kernel error code (not "Invalid argument") if the request size would be legal by itself but is rejected due to other pre-existing allocations. You might want to try deliberately provoking such a situation and see what error you get.

This leads to me next question: is there an equivalent to the ipcs command
for Mac OS X?

Not that I've found. It's a very annoying omission :-(. I'm not sure if Darwin is sufficiently BSD-ish that it would work to compile up ipcs from one of the BSD distributions, but you could try ...

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])




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

Reply via email to