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-20 23:36:56
Message-ID: 24157.1413848216@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:
> In Mac OS X 10.10 Yosemite, Apple removed SystemStarter, upon which our OS X start script has relied since 2007. So here is a patch that adds support for its replacement, launchd. It includes 7 day log rotation like the old script did. The install script still prefers the SystemStarter approach for older versions of the OS, for the sake of easier backward compatibility. We could change that if we wanted, since launchd has been part of the OS for around a decade.

(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 ...)

(2) AFAICS, this .plist file doesn't do anything about launchd's habit of
not waiting for the network to come up. See my comments in today's thread
in -general:
http://www.postgresql.org/message-id/1239.1413823243@sss.pgh.pa.us

(3) I don't think you want Disabled = true.

(4) I'm suspicious of all the -c arguments in the .plist file. In general
I'm not a fan of specifying GUCs on the postmaster command line; that
makes it impossible to override their values via "normal" methods like
postgresql.conf or ALTER SYSTEM.

(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 ...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2014-10-20 23:51:48 Questions on domain on composite / casts ignoring domains
Previous Message Tatsuo Ishii 2014-10-20 23:30:30 Re: pg_dump/pg_restore seem broken on hamerkop