Re: Snow Leopard-how to get PG 8.4 to start up on demand? - Mailing list pgsql-general

From Scott Mead
Subject Re: Snow Leopard-how to get PG 8.4 to start up on demand?
Date
Msg-id d3ab2ec81002061907x4cc967dev40e3e084a6d14d4a@mail.gmail.com
Whole thread Raw
In response to Snow Leopard-how to get PG 8.4 to start up on demand?  (Michael Kohout <mwkohout@gmail.com>)
List pgsql-general


On Sat, Feb 6, 2010 at 2:19 PM, Michael Kohout <mwkohout@gmail.com> wrote:
Hi All;

I've got a development box that I use for a bunch of other purposes(mostly music), and I was wondering if there was a way to configure launchd to only start up postgres when it's needed.  SSH does the same thing so I've tried to fashion a plist for this purpose modeled after that(on my box it's located at /System/Library/LaunchDaemons/ssh.plist) but something is wrong.  PGAdmin 3 errors out when I try to connect.

Below is my nonworking plist.  Does anyone have any suggestions on what I'm doing wrong?

  PostgreSQL is a relational database system, very different than an on-demand type of service.  The engine is really built to come online and stay online.  I wouldn't recommend setting your database up like this at all.  Remember, a database is very complex, and you have a lot of background and maintenance processes that need to run.

As far as why it's dying, it's hard to say, but I don't see anything in your config file about the port to listen on... is it that simple?  I'm not sure, but it's worth a look.

--Scott
 

thanks 
Mike Kohout

Fender-2:LaunchDaemons development$ cat ondemand.postgres8.4.plist <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>ondemand.postgres8.4</string>
<key>UserName</key>
<string>development</string>
<key>KeepAlive</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/Users/development/Applications/postgres-8.4.1/bin/pg_ctl</string>
<string>start</string>
<string>-D</string>
<string>/Users/development/Documents/postgres_data</string>
</array>
<key>ServiceDescription</key>
<string>Postgresql Server</string>
<key>Sockets</key>
<dict>
<key>Listeners</key>
<dict>
<key>SockServiceName</key>
<string>postgresql</string>
</dict>
</dict>
<key>inetdCompatibility</key>
<dict><key>Wait</key><true/></dict>
</dict>
</plist>


pgsql-general by date:

Previous
From: Gaëtan Allart
Date:
Subject: SELECT DISTINCT triggers sorting operation
Next
From: Scott Marlowe
Date:
Subject: Re: SELECT DISTINCT triggers sorting operation