我在Lion系统上使用Homebrew安装了PostgreSQL。它可以正常启动,但无法正常关闭。我尝试了:
$ #started with
$ pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
$ #tried stoping with
$ pg_ctl -D /usr/local/var/postgres stop -m immediate
waiting for server to shut down................................... failed
pg_ctl: server does not shut down
我通过删除启动代理程序解决了这个问题:
launchctl unload -w ~/Library/LaunchAgents/org.postgresql.postgres.plist
rm ~/Library/LaunchAgents/org.postgresql.postgres.plist
$ launchctl load -w ~/Library/LaunchAgents/org.postgresql.postgres.plist
- stantonk~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
。 - lfender6445