PostgreSQL uses more memory on 6.1?

Mark Kirkwood markir at
Tue May 23 17:51:57 PDT 2006

Kirk Strauser wrote:
> On Tuesday 23 May 2006 16:19, Jung-uk Kim wrote:
>> I meant 'kern.ipc.shmall', which used to be 'kern.ipc.shmmaxpgs'. :-(
> That did it!  Bumping kern.ipc.shmall to 65536 got me back up and running 
> with enough shared_memory to get my jobs done.

Having not so long ago been caught by this myself, I think the 
relationship between shmmax and shmall is worth clarifying:

$ sysctl -d kern.ipc.shmall
kern.ipc.shmall: Maximum number of pages available for shared memory
$ sysctl -d kern.ipc.shmmax
kern.ipc.shmmax: Maximum shared memory segment size

So to run 1 Postgres installation with 128Mb of shared memory:


However suppose you want to run 2 Postgres installations, each using 
128Mb of shared memory:


i.e. maximum system wide shared memory is 65536*4096 = 256Mb, but the 
maximum size any single segment can be is 128Mb.



More information about the freebsd-stable mailing list