Help a Boulderite get PG running?

From: Gavin Kistner <phrogz(at)mac(dot)com>
To: diapug(at)postgresql(dot)org
Subject: Help a Boulderite get PG running?
Date: 2010-04-30 05:35:22
Message-ID: AFF55866-D44A-452A-B497-BF24C0F369E5@mac.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: denpug

Howdy Denver from the foothills above Boulder. :)

I'm trying to get PG running again on my Mac laptop. I had a working install from the days of 10.5, but haven't gotten things working again with Snow Leopard. Tonight I gave it another shot, to no avail.

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. I've also dropped my max_connections and shared_buffers. 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.

Responses

Browse denpug by date

  From Date Subject
Next Message Gordon Shannon 2010-04-30 16:29:17 Re: Help a Boulderite get PG running?
Previous Message Kevin Kempter 2010-04-14 22:16:00 Meeting at 6:30pm today - PostgreSQL 9.0 Overview