[postgis-users] Shared memory extesion on a a Mac for PostgreSQL/PostGIS

Rosemary Alles rosemary.alles at gmail.com
Fri Mar 4 13:30:07 PST 2011


Hullo all,

I'm attempting to store several sets of GPS derived spatial data (simple
lat/lon mostly) in PostGIS and have hence installed PostgreSQL with the
PostGIS extension on my iMac (running 10.6.6), the readme that comes with
the PostgreSQL (at least for the latest version of it) casually warns of the
need to increase -significantly- the amounts of shared memory availalbe for
use. (See "attached" readme) Has anyone done this and what are the risks?
I'm rather unwilling to mess with sysctl.conf simply to get PostGIS
working.. but then I can always create and delete the file via [sudo] if
things start getting weird.. that's an option as well.

Also and rather disconertingly the "warning" re: shared memory seems to come
with/from the Mac  OS X installer setup by http://www.enterprisedb.com (via
http://www.postgresql.org/)  and not with installers from
http://www.kyngchaos.com/software:postgres (via
http://postgis.refractions.net/)

I'm new to this and will be using PostgreSQL/PostGIS (only) to demonstrate a
prototype (at least initially) - i..e. DB will be pretty small. What is the
best way to go about this issue and incidentally is pgAdmin any help at all
with managing the DB?

Any thoughts?

[Readme] from http://www.enterprisedb.com follows:

----------------------------------------------------------------------------------------------------------------------------------------

Shared Memory
-------------

PostgreSQL uses shared memory extensively for caching and inter-process
communication. Unfortunately, the default configuration of Mac OS X does
not allow suitable amounts of shared memory to be created to run the
database server.

Before running the installation, please ensure that your system is
configured to allow the use of larger amounts of shared memory. Note that
this does not 'reserve' any memory so it is safe to configure much higher
values than you might initially need. You can do this by editting the
file /etc/sysctl.conf - e.g.

% sudo vi /etc/sysctl.conf

On a MacBook Pro with 2GB of RAM, the author's sysctl.conf contains:

kern.sysv.shmmax=1610612736
kern.sysv.shmall=393216
kern.sysv.shmmin=1
kern.sysv.shmmni=32
kern.sysv.shmseg=8
kern.maxprocperuid=512
kern.maxproc=2048

Note that (kern.sysv.shmall * 4096) should be greater than or equal to
kern.sysv.shmmax. kern.sysv.shmmax must also be a multiple of 4096.

Once you have edited (or created) the file, reboot before continuing with
the installation. If you wish to check the settings currently being used by
the kernel, you can use the sysctl utility:

% sysctl -a

The database server can now be installed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110304/0df34001/attachment.html>


More information about the postgis-users mailing list