Re: running two servers on one machine

From: Eric Smith <eric_h_smith(at)mac(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: running two servers on one machine
Date: 2009-03-31 02:58:37
Message-ID: 15BD56B8-956D-49B7-8A4C-A480EDEAE5BD@mac.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bingo!

I doubled each of the entries below, and the two servers are now
running together quite happily!

Regards,
Eric

On Mar 30, 2009, at 7:56 PM, Eric Smith wrote:

> ... as a reminder, this is running on mac os 10.5
>
> Eric
>
> On Mar 30, 2009, at 7:53 PM, Eric Smith wrote:
>
>> Ahhh! Can't seem to make this go away!
>>
>> Here is the log file entry:
>>
>> FATAL: could not create shared memory segment: Cannot allocate
>> memory
>> DETAIL: Failed system call was shmget(key=5432001, size=4030464,
>> 03600).
>> HINT: This error usually means that PostgreSQL's request for a
>> shared memory segment exceeded available memory or swap space. To
>> reduce the request size (currently 4030464 bytes), reduce
>> PostgreSQL's shared_buffers parameter (currently 300) and/or its
>> max_connections parameter (currently 23).
>> The PostgreSQL documentation contains more information about
>> shared memory configuration.
>>
>>
>>
>> Following the queue on the postgres web page, I created /etc/
>> sysctl.conf and added the following five entries:
>>
>> kern.sysv.shmmax=4194304
>> kern.sysv.shmmin=1
>> kern.sysv.shmmni=32
>> kern.sysv.shmseg=8
>> kern.sysv.shmall=1024
>>
>> But when I try to start two servers, I get the same error. Should
>> I be bumping these numbers up?
>>
>> Eric
>>
>> On Mar 30, 2009, at 7:18 PM, Tom Lane wrote:
>>
>>> Eric Smith <eric_h_smith(at)mac(dot)com> writes:
>>>> Log file says "could not create shared memory segment". It also
>>>> says
>>>> that I should change max_connections or shared_buffers.
>>>
>>>> Error message claims that max_connections is 23, but
>>>> postgresql.conf
>>>> has this listed as 20.
>>>
>>> The autovacuum workers get added on.
>>>
>>>> Error message claims that shared_buffers is 300, but
>>>> postgresql.conf
>>>> has this listed as 2400kB.
>>>
>>> Same thing, different units.
>>>
>>> Anyway, you left out the interesting part of the error message,
>>> ie the kernel error code. If it's "Cannot allocate memory" then
>>> you probably need to increase SHMALL.
>>>
>>> regards, tom lane
>>>
>>> --
>>> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
>>> To make changes to your subscription:
>>> http://www.postgresql.org/mailpref/pgsql-general
>>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-03-31 03:12:04 Re: running two servers on one machine
Previous Message Eric Smith 2009-03-31 02:56:48 Re: running two servers on one machine