Re: Patch: Add launchd Support

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Patch: Add launchd Support
Date: 2014-10-21 00:17:12
Message-ID: 25261.1413850632@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"David E. Wheeler" <david(at)justatheory(dot)com> writes:
> On Oct 20, 2014, at 4:36 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> (1) I'd vote for just removing the SystemStarter stuff: it complicates
>> understanding what's happening, to no very good end. We can easily
>> check that the launchd way works back to whatever we think our oldest
>> supported OS X release is. (10.4.x according to the buildfarm, at least;
>> and I think SystemStarter was deprecated even then ...)

> Okay. Might have to use OnDemand instead of KeepAlive on 10.4. The former was deprecated in 10.5, but Im not sure when the former was added.

[ looks ... ] Yeah, there's no mention of KeepAlive in 10.4's
launchd.plist man page. It does have a convenient example
saying that OnDemand = false does what we want:

The following XML Property List simply keeps "exampled" running continu-
ously:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN
http://www.apple.com/DTDs/PropertyList-1.0.dtd >
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.example.exampled</string>
<key>ProgramArguments</key>
<array>
<string>exampled</string>
</array>
<key>OnDemand</key>
<false/>
</dict>
</plist>

>> (5) According to the launchd.plist man page, there are options for
>> redirecting stdout and stderr to someplace useful. It might be worth
>> exercising those ...

> Suggestions?

I'd just drop them into files in the data directory; we're still going
to recommend that people use the logging_collector, so this is just a
stopgap to collect startup errors.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2014-10-21 00:18:31 Re: Proposal: Log inability to lock pages during vacuum
Previous Message Jim Nasby 2014-10-21 00:12:56 Re: get_actual_variable_range vs idx_scan/idx_tup_fetch