Re: Help a Boulderite get PG running?

From: Gordon Shannon <gordo169(at)gmail(dot)com>
To: Gavin Kistner <phrogz(at)mac(dot)com>
Cc: diapug(at)postgresql(dot)org
Subject: Re: Help a Boulderite get PG running?
Date: 2010-04-30 16:29:17
Message-ID: r2wb2dd93301004300929k76b16defv2dd4463f8c4b4624@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: denpug

FWIW, I'm running fine on Leopard (4Gb, but also ran fine when I had 2Gb),
and I can give you my settings.

$ sysctl -a | grep shm
kern.sysv.shmmax: 4194304
kern.sysv.shmmin: 1
kern.sysv.shmmni: 32
kern.sysv.shmseg: 8
kern.sysv.shmall: 1024
machdep.pmap.hashmax: 24
security.mac.posixshm_enforce: 1
security.mac.sysvshm_enforce: 1

shared_buffers = 2400kB # min 128kB
max_connections = 20 # (change requires restart)

/Gordon

On Thu, Apr 29, 2010 at 11:35 PM, Gavin Kistner <phrogz(at)mac(dot)com> wrote:

> 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.
>
>
>
> --
> Sent via diapug mailing list (diapug(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/diapug
>

--
If I had more time, I could have written you a shorter letter. (Blaise
Pascal)

In response to

Browse denpug by date

  From Date Subject
Next Message Kevin Kempter 2010-05-12 15:29:26 Tonite's meeting has been cancelled
Previous Message Gavin Kistner 2010-04-30 05:35:22 Help a Boulderite get PG running?