help? trouble setting Shared Memory parameters in OSX kernel (fwd)

From: R Blake <blakers(at)mac(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: help? trouble setting Shared Memory parameters in OSX kernel (fwd)
Date: 2003-03-17 01:46:13
Message-ID: 2147483647.1047836773@[172.30.10.6]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

hi all,

tried this on pgsql-admin & darwin-kernel lists, and unfortunately, not a
'nibble' ...

can ne1 here spare a moment?

thanks!

richard

---------- Forwarded Message ----------

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

Browse pgsql-hackers by date

  From Date Subject
Next Message A.Bhuvaneswaran 2003-03-17 05:23:50 Re: CREATELANG in pgsql 7.3.2 failing
Previous Message Hannu Krosing 2003-03-16 20:41:15 Re: Roadmap for FE/BE protocol redesign