Re: Shared memory errors during initdb in Mac OS X

From: Jerry LeVan <jerry(dot)levan(at)eku(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: John Siracusa <siracusa(at)mindspring(dot)com>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Shared memory errors during initdb in Mac OS X
Date: 2004-03-22 21:20:39
Message-ID: C4C70EA5-7C46-11D8-89D3-000393779D9C@eku.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 <siracusa(at)mindspring(dot)com> 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
> majordomo(at)postgresql(dot)org)
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Keary Suska 2004-03-22 21:43:54 Re: "select for update" confusion
Previous Message Tom Lane 2004-03-22 21:02:54 Re: Shared memory errors during initdb in Mac OS X