Re: SHMMAX seems entirely broken in OS X 10.4.2 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: SHMMAX seems entirely broken in OS X 10.4.2
Date
Msg-id 10265.1129495759@sss.pgh.pa.us
Whole thread Raw
In response to Re: SHMMAX seems entirely broken in OS X 10.4.2  ("Luke Lonergan" <llonergan@greenplum.com>)
List pgsql-hackers
[ resuming an old thread ]

"Luke Lonergan" <llonergan@greenplum.com> writes:
> I also tried different settings (shmall set to 500K) and shmmax ended up at
> -1.  So, it seems that shmall is in pages.  I didn't try other allowable
> configs, which was a problem before.

I went back and experimented some more with this issue, and I believe
I've finally nailed down what the problem is: as of 10.4.something, OS X
rejects attempts to set SHMMAX to anything that isn't an exact multiple
of the page size (4096).  Every other Unix on the planet, including
earlier versions of OS X, will round off the value to whatever unit
they feel like supporting ... but not Tiger.  Thanks for this usability
improvement, Apple.

Also, the /etc/sysctl.conf file is utterly useless for setting SHM
settings in 10.4.2, because whatever it sets will be overridden by the
sysctl command that /etc/rc does just after reading /etc/sysctl.conf.
Perhaps in prior versions, the behavior was "first set wins" ... but
now it is definitely "last set wins".  (SHMMAX eventually gets locked
down and can't be changed anymore; I'm not sure what triggers that,
but the sysctl in /etc/rc definitely gets to change what you put in
/etc/sysctl.conf.)  Perhaps Apple can be persuaded to change the order
of these operations in /etc/rc, but until they do there is no point
in suggesting that people use /etc/sysctl.conf.

Bottom line: in 10.4.2, you have to edit /etc/rc to adjust SHMMAX,
and you'd better be sure it is an exact multiple of 4096.

I'll add a note about this to our documentation.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Question about Ctrl-C and less
Next
From: Josh Berkus
Date:
Subject: Re: FYI: PotgreSQL and SQL standards commentary WWW page