Dogs Chasing Squirrels

A software development blog

Monthly Archives: June 2023

Increasing shared memory on mac OS

2

Today I installed pgpool-ii, the Postgresql connection pool application, on a mac. By default, it tries to use allocate a local memory cache, but the shared memory pool on a mac is lower than the amount it tries to allocate, resulting in an error like “Could not create shared memory segment: Invalid argument.”.

You can see the available memory by running:

sysctl -a|grep "\.shm"

To increase the available shared memory, run this:

sudo sysctl -w kern.sysv.shmmax=268435456