Andrew Barinov
2012-02-05 04:50:34 UTC
Hello,
I'm having trouble restarting the postgres server on my mac. The error I am
getting when I try to run PG is:
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"?
Here's the command that I tried:
sudo su postgres
bash-3.2$ /Library/PostgreSQL/9.1/bin/pg_ctl -D
/Library/PostgreSQL/9.1/data restart
pg_ctl: PID file "/Library/PostgreSQL/9.1/data/postmaster.pid" does not
exist
Is server running?
starting server anyway
server starting
then I checked the server status:
bash-3.2$ /Library/PostgreSQL/9.1/bin/pg_ctl -D
/Library/PostgreSQL/9.1/data status
pg_ctl: no server running
I verified that the pg_ctl and pg_conf files were in place.
I then went ahead and tried this:
bash-3.2$ /Library/PostgreSQL/9.1/bin/pg_ctl -D
/Library/PostgreSQL/9.1/data start
server starting
then I checked the server status:
bash-3.2$ /Library/PostgreSQL/9.1/bin/pg_ctl -D
/Library/PostgreSQL/9.1/data status
pg_ctl: no server running
Why is the postgres not starting? I am doing all this under the postgres
superuser, so I should not have any issue with user privileges.
Thanks,
Andrew
I'm having trouble restarting the postgres server on my mac. The error I am
getting when I try to run PG is:
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"?
Here's the command that I tried:
sudo su postgres
bash-3.2$ /Library/PostgreSQL/9.1/bin/pg_ctl -D
/Library/PostgreSQL/9.1/data restart
pg_ctl: PID file "/Library/PostgreSQL/9.1/data/postmaster.pid" does not
exist
Is server running?
starting server anyway
server starting
then I checked the server status:
bash-3.2$ /Library/PostgreSQL/9.1/bin/pg_ctl -D
/Library/PostgreSQL/9.1/data status
pg_ctl: no server running
I verified that the pg_ctl and pg_conf files were in place.
I then went ahead and tried this:
bash-3.2$ /Library/PostgreSQL/9.1/bin/pg_ctl -D
/Library/PostgreSQL/9.1/data start
server starting
then I checked the server status:
bash-3.2$ /Library/PostgreSQL/9.1/bin/pg_ctl -D
/Library/PostgreSQL/9.1/data status
pg_ctl: no server running
Why is the postgres not starting? I am doing all this under the postgres
superuser, so I should not have any issue with user privileges.
Thanks,
Andrew