From: | John Siracusa <siracusa(at)mindspring(dot)com> |
---|---|
To: | Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Shared memory errors during initdb in Mac OS X |
Date: | 2004-03-22 18:45:02 |
Message-ID: | BC849E5E.879E0%siracusa@mindspring.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Here's the error and the helpful advice:
---
% /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
The files belonging to this database system will be owned by user
"postgres".
This user must also own the server process.
[...]
creating configuration files... ok
creating template1 database in /usr/local/pgsql/data/base/1... FATAL: could
not create shared memory segment: Invalid argument
DETAIL: Failed system call was shmget(key=1, size=1081344, 03600).
HINT: This error usually means that PostgreSQL's request for a shared
memory segment exceeded your kernel's SHMMAX parameter. You can either
reduce the request size or reconfigure the kernel with larger SHMMAX. To
reduce the request size (currently 1081344 bytes), reduce PostgreSQL's
shared_buffers parameter (currently 50) and/or its max_connections parameter
(currently 10).
If the request size is already small, it's possible that it is less
than your kernel's SHMMIN parameter, in which case raising the request size
or reconfiguring SHMMIN is called for.
The PostgreSQL documentation contains more information about shared
memory configuration.
initdb: failed
---
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?
-John
From | Date | Subject | |
---|---|---|---|
Next Message | John Siracusa | 2004-03-22 19:17:09 | Re: Shared memory errors during initdb in Mac OS X |
Previous Message | Guy Fraser | 2004-03-22 17:04:54 | Re: |