Can't make postgresql load at startup in Mac OS

Ha Pham picture Ha Pham · Oct 13, 2014 · Viewed 14.9k times · Source

I have installed postgresql via HomeBrew. It worked but today I find that postgresql server does not run when computer start.

I try to use launchctl to load it again with below command:

$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

and I see the message:

/usr/local/Cellar/postgresql/9.3.4/homebrew.mxcl.postgresql.plist: Service is disabled

I do not know how to enable postgresql service. Could anyone show me?

Answer

Parag Bafna picture Parag Bafna · Oct 16, 2014

Use -w option with launchctl.

$ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist 

-w Overrides the Disabled key and sets it to false.