From: | Gavin Kistner <phrogz(at)mac(dot)com> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Subject: | Fresh build on OS X not working (memory) |
Date: | 2010-04-30 05:32:10 |
Message-ID: | 88181C2E-01CD-417C-8266-D5C9AF570C27@mac.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Mac OS X 10.6.3
Built and installed PG 8.4.3 from source
Trying to start the server, I get "could not create shared memory segment: Invalid argument".
I've bumped my shmmax/shmall and related parameters as suggested in the README for the one-click installer (which I installed and then uninstalled before building from source), and then even higher as suggested by users on IRC. No luck.
This is for a dev laptop (2GB RAM), so I don't care about tuning performance. I just want pg to get up and running at all.
Any suggestions for what to try next are welcome. Relevant details follow:
Slim2:pgsql _postgres$ sysctl -a | grep shm
kern.sysv.shmmax: 2147483648
kern.sysv.shmmin: 1
kern.sysv.shmmni: 32
kern.sysv.shmseg: 8
kern.sysv.shmall: 2147483648
machdep.pmap.hashmax: 12
security.mac.posixshm_enforce: 1
security.mac.sysvshm_enforce: 1
Slim2:pgsql _postgres$ cat data/postgresql.conf | grep -E "max_conn|shared_buff"
max_connections = 10 # (change requires restart)
# Note: Increasing max_connections costs ~400 bytes of shared memory per
shared_buffers = 16MB # min 128kB
# max_locks_per_transaction * (max_connections + max_prepared_transactions)
Slim2:pgsql _postgres$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data start
server starting
Slim2:pgsql _postgres$ FATAL: could not create shared memory segment: Invalid argument
DETAIL: Failed system call was shmget(key=5432001, size=18366464, 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 18366464 bytes), reduce PostgreSQL's shared_buffers parameter (currently 2048) and/or its max_connections parameter (currently 13).
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2010-04-30 05:42:20 | Re: Fresh build on OS X not working (memory) |
Previous Message | Scott Marlowe | 2010-04-29 21:06:49 | Re: more 10K disks or less 15K disks |