pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: R Blake <blakers@mac.com>
To: pgsql-admin@postgresql.org
To: darwin-kernel@lists.apple.com
Subject: help? trouble setting Shared Memory parameters in OSX kernel
Date: Sat, 15 Mar 2003 19:56:02 -0800
Message-ID: <2147483647.1047758162@[172.30.10.6]> (raw)

hi all,

i've successfully built postgreSQL 7.3.2-STABLE on Mac OSX 10.2.4.

much trouble launching it led me to the discussions 
(<http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=kernel-re
sources.html>) on setting shared memory parameters -- especially SHMMAX -- 
in OSX's "/System/Library/StartupItems/SystemTuning/SystemTuning"

so, as instructed, i changed the defaults (near the bottom of SystemTuning):

    sysctl -w kern.sysv.shmmax=4194304
    sysctl -w kern.sysv.shmmin=1
    sysctl -w kern.sysv.shmmni=32
    sysctl -w kern.sysv.shmseg=8
    sysctl -w kern.sysv.shmall=1024

to:

    sysctl -w kern.sysv.shmmax=33554432 # bytes
    sysctl -w kern.sysv.shmmin=1
    sysctl -w kern.sysv.shmmni=32
    sysctl -w kern.sysv.shmseg=8
    sysctl -w kern.sysv.shmall=8192 # 4K pages

and defined (in postgresql.conf):

        shared_buffers = 2048
        max_coinnection = 1024

and rebooted.

unfortunately, immediately after system launch, i still couldn't launch 
postgres

eventually, a random check with "sysctl -a" gave:

        kern.sysv.shmmax: -1
        kern.sysv.shmmin: -1
        kern.sysv.shmmni: -1
        kern.sysv.shmseg: -1
        kern.sysv.shmall: -1

OBVIOUSLY, a problem!

i CAN enter the sysctl settings at the command line, verify success with 
'sysctl -a', and then postgres launches/operates just fine .....

QUESTIONS:

any idea why these setting are being written at boot to values of "-1"?

how do i get these setting to 'stick'?

thanks,

richard




view thread (2+ messages)  latest in thread

Message-ID: <2147483647.1047758162@[172.30.10.6]>
Permalink:  ../2147483647.1047758162@%5B172.30.10.6%5D/
Also on:    postgresql.org/message-id/2147483647.1047758162@[172.30.10.6]

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: blakers@mac.com, darwin-kernel@lists.apple.com
  Subject: Re: help? trouble setting Shared Memory parameters in OSX kernel
  In-Reply-To: <2147483647.1047758162@[172.30.10.6]>
  References: <2147483647.1047758162@[172.30.10.6]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox