Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
993 views
in Technique[技术] by (71.8m points)

postgresql - Mountain Lion Postgres could not connect

After my update to mountain lion my postgres doest work. It is still running but my applications cant connect to it anymore.

$ ps aux | grep postgres
postgres         204   0.0  0.0  2446960    836   ??  Ss    7:31AM   0:00.59 postgres: stats collector process    
postgres         203   0.0  0.1  2478732   2240   ??  Ss    7:31AM   0:00.41 postgres: autovacuum launcher process    
postgres         202   0.0  0.0  2478600    584   ??  Ss    7:31AM   0:00.34 postgres: wal writer process    
postgres         201   0.0  0.0  2478600    784   ??  Ss    7:31AM   0:00.48 postgres: writer process    
postgres          95   0.0  0.0  2446960    368   ??  Ss    7:31AM   0:00.11 postgres: logger process    
postgres          64   0.0  0.2  2478600   7972   ??  Ss    7:31AM   0:00.26 /Library/PostgreSQL/9.1/bin/postmaster -D/Library/PostgreSQL/9.1/data
anezio         10205   0.0  0.0  2432768    624 s000  R+    8:01AM   0:00.00 grep postgres

and my applications are returning this error:

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"?

I still can connect to psql with the command /Library/PostgreSQL/9.1/bin/psql -U postgres

Seems like something is not pointing to the right place

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I just had the same problem. Personally I just reinstalled from the Postgres installer (postgresql-9.1.3-1-osx.dmg in my case), rebooted my mac and all is fine again. p.s. re-installing didn't zap my databases :)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...