Re: initdb fails to allocate shared memory

From: "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: initdb fails to allocate shared memory
Date: 2010-08-25 15:41:03
Message-ID: 610C51D6-BDB9-4CF3-A2C4-A079B339F1A8@themactionfaction.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers


On Aug 25, 2010, at 11:31 AM, Joshua D. Drake wrote:

> On Wed, 2010-08-25 at 11:15 -0400, A.M. wrote:
>> I am using pgsql9.0b4 (but pgsql8.4 exhibits the same behavior) on MacOS 10.6.4 and initdb fails:
>> initdb: removing data directory "/Volumes/Data/pgsql90b"
>>
>> I would like to create the database space and then reduce the shared memory requirements in postgresql.conf, but this situation seems to create a chicken-and-egg problem. How can I reduce shared_buffers or max_connections prior to running initdb?
>
> If you don't have enough shared memory to initdb, you don't have enough
> to run postgresql. You need to increase your shared memory for MacOS
> per:
>
> http://www.postgresql.org/docs/8.4/static/kernel-resources.html
>
> And then initdb.

Then it seems that the error reporting could be improved to not mention "shared_buffers" and "max_connections" neither of which I can touch during initdb.

"creating template1 database in /Volumes/Data/pgsql90b/base/1 ... FATAL: could not create shared memory segment: Cannot allocate memory
DETAIL: Failed system call was shmget(key=1, size=1703936, 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 1703936 bytes), reduce PostgreSQL's shared_buffers parameter (currently 50) and/or its max_connections parameter (currently 14).
The PostgreSQL documentation contains more information about shared memory configuration."

Cheers,
M

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Denis Papathanasiou 2010-08-25 15:54:03 Differences between to_tsquery() and plainto_tsquery() when it comes to applying an index?
Previous Message Wappler, Robert 2010-08-25 15:40:18 Re: Optimizing queries that use multiple tables and many order by columns

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-08-25 15:43:01 Re: git: uh-oh
Previous Message Michael Haggerty 2010-08-25 15:40:16 Re: git: uh-oh