[Discuss] os x postresql startup question

Eric Chadbourne eric.chadbourne at icloud.com
Fri Jan 2 14:29:56 EST 2015


On Jan 2, 2015, at 1:21 PM, David N. Blank-Edelman <dnb at ccs.neu.edu> wrote:
> 
> 
>> On Jan 2, 2015, at 1:14 PM, Eric Chadbourne <eric.chadbourne at icloud.com> wrote:
>> 
>> Where is the start up of PostgreSQL controlled in OS X Yosemite?
> 
> It is likely being started via launchd. An easy way to edit launchd entries is to get the Lingon app (https://www.peterborgapps.com/lingon/).
> 
> BTW, if you just want to play with Postgres on OSX, there is a lovely Postgres.app created by one of the Heroku people:
> 
> http://postgresapp.com
> 
>   -- dNb
> 


Hi All,

Cool looking apps David.  I’ll check them out.

I would like to learn how OSX controls programs.  Good tip about launchd.

Here’s what I’ve found.

$ sudo launchctl list | grep postgresql
52	0	com.edb.launchd.postgresql-9.4

And I found this here:

/Library/LaunchDaemons/com.edb.launchd.postgresql-9.4.plist

*Attempt #1*

In the xml I see:

        <key>RunAtLoad</key>
        <true/>

I changed true to false and restarted but for some reason the app still started.

Fail.

*Attempt #2*

I then tried this command:

sudo launchctl unload com.edb.launchd.postgresql-9.4.plist

I noticed in the xml file that it added a <disabled> key.  Strangley PosgreSQL still starts on boot.

Fail.

*Attempt #3*

$ sudo mv /Library/LaunchDaemons/com.edb.launchd.postgresql-9.4.plist /Users/eric/

This works.  PostgreSQL doesn’t start.  But when I want to start PostgreSQL with

sudo launchctl start <point to new location of plist>

it gives no error but doesn’t actually start anything.

Fail.

I have plenty of linux boxen to play with and don’t need to do this on a mac.  I’m just curious about how this new toy works.  I’ll probably remove the Enterprise DB app unless I’ve missed something.

Thanks,

Eric


More information about the Discuss mailing list