Alexander Farber <alexander.farber@gmail.com> writes:
> And "brew services list" reports it as "started":
> postgresql started afarber
> /Users/afarber/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
> And I can restart it:
> # brew services restart postgresql
> Stopping `postgresql`... (might take a while)
> ==> Successfully stopped `postgresql` (label: homebrew.mxcl.postgresql)
> ==> Successfully started `postgresql` (label: homebrew.mxcl.postgresql)
> But unfortunately I can not connect with "psql":
> psql: could not connect to server: No such file or directory
> Is the server running locally and accepting
> connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
I'd start by figuring out where that packaging causes the postmaster
to write its log file, and having a look in the log file.
Hopefully there is some documentation included with the homebrew PG
package that explains that. But if not, perhaps a look into the
launch-agent script mentioned above would tell you. Look for something
like a -l argument to pg_ctl, or a redirection of stderr into a file.
regards, tom lane