このエラーがなかなか消えなかった。。

psql: could not connect to server: No such file or directory

Is the server running locally and accepting
connections on Unix domain socket “/var/pgsql_socket/.s.PGSQL.5432”?

解決方法

$vi .bashrc
export PGHOST=localhost
$source .bashrc