我在Lion上使用brew 软件安装了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
我通过删除Launch Agent解决了这个问题:
launchctl unload -w ~/Library/LaunchAgents/org.postgresql.postgres.plist
rm ~/Library/LaunchAgents/org.postgresql.postgres.plist