I have a Postgres 9.6 instance on OSX that is up and running, but Sqitch throws the following error when I try sqitch status
in a working directory with a sqitch.conf
:
$ sqitch status
# On database db:pg:my_db
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
This is odd because I have already checked that Postgres is running by checking its status and logging in directly:
$ pg_isready
/tmp:5432 - accepting connections
$ psql -U postgres
psql (9.6.19)
Type "help" for help.
postgres=#
This seems to be just a problem with sqitch
.
For more detail, this Postgres was installed via brew install postgresql@9.6
and is located in the default directory:
$ which psql
/usr/local/opt/postgresql@9.6/bin/psql
Regarding Sqitch, I have tried both installing with Homebrew and using Docker (my current approach). The docker install is based on the official instructions:
docker pull sqitch/sqitch
curl -L https://git.io/JJKCn -o sqitch && chmod +x sqitch
./sqitch status
I tried setting psql
explicitly as well with sqitch config --user engine.pg.client /usr/local/opt/postgresql@9.6/bin/psql
Regardless, I still get the following with any sqitch
command:
$ sqitch status
# On database db:pg:my_db
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I'm not sure what I'm missing and could use some input. Thanks in advance.