These are instructions to setup Postgres.app to allow connections over unix sockets. These instructions were written for macOS Sierra (10.12) and Postgres.app 9.6.0
- Run Postgres.app once so that the configuration is initialized in
~/Library/Application Support/Postgres/var-9.6/
- Quit Postgres.app
- Open
~/Library/Application Support/Postgres/var-9.6/postgresql.conf
in your favorite text editor - Uncomment the line
unix_socket_directories = '/tmp'
and change it tounix_socket_directories = '/var/pgsql_socket,/tmp'
- Run
sudo mkdir -p /var/pgsql_socket
- Run
sudo chmod 770 /var/pgsql_socket
- Run
sudo chown root:staff /var/pgsql_socket
Note: the config directory depends on the Postgres.app's major version…