PostgreSQL server wouldn't shutdown on Lion (Mac OS 10.7)

Greg picture Greg · Aug 5, 2011 · Viewed 22k times · Source

I installed PostgreSQL using Homebrew on Lion. It starts okay but wouldn't shutdown. I tried:

$ #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

I fixed this issue by deleting the Launch Agent:

launchctl unload -w ~/Library/LaunchAgents/org.postgresql.postgres.plist
rm ~/Library/LaunchAgents/org.postgresql.postgres.plist

Answer

Greg picture Greg · Jun 30, 2012
launchctl unload -w ~/Library/LaunchAgents/org.postgresql.postgres.plist
rm ~/Library/LaunchAgents/org.postgresql.postgres.plist