initdb fails to allocate shared memory

From: "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: initdb fails to allocate shared memory
Date: 2010-08-25 15:15:21
Message-ID: 77E9DF08-63C7-47C6-AFCE-51C7FC710A65@themactionfaction.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

I am using pgsql9.0b4 (but pgsql8.4 exhibits the same behavior) on MacOS 10.6.4 and initdb fails:

/usr/local/pgsql90beta/bin/initdb -D /Volumes/Data/pgsql90b/ -E UTF8
The files belonging to this database system will be owned by user "agentm".
This user must also own the server process.

The database cluster will be initialized with locale en_US.UTF-8.
The default text search configuration will be set to "english".

creating directory /Volumes/Data/pgsql90b ... ok
creating subdirectories ... ok
selecting default max_connections ... 10
selecting default shared_buffers ... 400kB
creating configuration files ... ok
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.
child process exited with exit code 1
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?

Cheers,
M

Responses

Browse pgsql-general by date

  From Date Subject
Next Message bricklen 2010-08-25 15:25:41 unexpected message type 0x58 during COPY from stdin
Previous Message Denis BUCHER 2010-08-25 15:06:52 Re: Feature proposal

Browse pgsql-hackers by date

  From Date Subject
Next Message Markus Wanner 2010-08-25 15:30:07 Re: Deadlock bug
Previous Message Steve Singer 2010-08-25 15:05:57 Re: HS/SR on AIX