Increasing max connections under os x - sociam/indx GitHub Wiki
To increase postgresql's max_connections, you must first increase the system's shared memory parameters.
Create a file called /etc/sysctl.conf
and put in the following:
kern.sysv.shmmax=40960000
kern.sysv.shmmin=1
kern.sysv.shmmni=32
kern.sysv.shmseg=8
kern.sysv.shmall=4096
Then reboot.
Then edit your postgresql.conf
and change max_connections
to 100 (or whatever you want the value to be).
If you are using Postgres.app, then the file is located at:
~/Library/Application\ Support/Postgres/var/postgresql.conf