[PostgreSQL] MacでPostgreSQLが起動できない!ときの解決
Mac OSXアップデート後によくなる。いつも忘れる。
自動起動にしてるのに起動しない。
起動してみるとエラー
@withelmo ~$ pg_ctl -l /usr/local/var/postgres/server.log start
pg_ctl: another server might be running; trying to start server anyway
server starting
ps
で見てもプロセスがあるわけではない。
@withelmo ~$ ls -la /usr/local/var/postgres/postmaster.pid
-rw------- 1 withelmo admin 79 4 7 03:42 /usr/local/var/postgres/postmaster.pid
pidファイルが残ってしまってるのが問題とのこと。さくっと削除。
@withelmo ~$ pg_ctl -l /usr/local/var/postgres/server.log start
server starting
無事に起動。888