You're using the psql
from postgres.app
. It's configured to, by default, connect to the database server from postgres.app
. That won't work if postgres.app
is not running.
With our without -h
, you must have postgres.app
running.
If you want to run a background PostgreSQL server, postgres.app
isn't what you want. Install from Homebrew or use the EnterpriseDB installer packages.