Re: Shared memory errors during initdb in Mac OS X

From: John Siracusa <siracusa(at)mindspring(dot)com>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Shared memory errors during initdb in Mac OS X
Date: 2004-03-22 19:17:09
Message-ID: BC84A5E5.87A04%siracusa@mindspring.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 3/22/04 1:45 PM, John Siracusa wrote:
> Of course, I'v already set all the shared memory params, and have been runing
> 7.4.1 quite successfully with them. Immediately after the error above, I ran
> this to check the values:
>
> % sysctl -a | egrep shm
> kern.sysv.shmmax: 10485760
> kern.sysv.shmmin: 1
> kern.sysv.shmmni: 10240
> kern.sysv.shmseg: 4096
> kern.sysv.shmall: 33554432
>
> Since 1081344 is less than 10485760, I'm not sure what to do. I'd take the
> error message' advice and adjust shared_buffers or max_connections, but those
> params don't even exist yet since initdb is supposed to create the
> postgres.conf file that they're found in.
>
> Any suggestions? What should I try next?

Okay, I changed the settings to this:

kern.sysv.shmmax: 268435456
kern.sysv.shmmin: 1
kern.sysv.shmmni: 10240
kern.sysv.shmseg: 4096
kern.sysv.shmall: 65536

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 wanted to clean it out using ipcs, but that command doesn't
seem to exist in OS X. (Incidentally, Postgres's ipcclean command doesn't
work on OS X due to the lack of an ipcs command.)

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

-John

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Reza Zakery 2004-03-22 19:24:47 Any Information About Simulation Enviroment?
Previous Message John Siracusa 2004-03-22 18:45:02 Shared memory errors during initdb in Mac OS X