< !DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> GroupName postgres Label org.postgresql.PostgreSQL OnDemand ProgramArguments /opt/local/lib/pgsql8/bin/pg_ctl -D /opt/local/var/pgsql8/defaultd […]" />

iA


Start postgres with launchd on OS X

by Jens-Christian Fischer. Average Reading Time: less than a minute.

The startup item for Postgres on OS X always fails on Tiger. Launchd (the launch daemon) to rescue:

[PostgreSQL launchd on Tiger][1] gave me the starting point and my /Library/LaunchDaemons/org.postgresql.PostgreSQL.plist looks like this:

< ?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">


GroupName
postgres
Label
org.postgresql.PostgreSQL
OnDemand

ProgramArguments

/opt/local/lib/pgsql8/bin/pg_ctl
-D
/opt/local/var/pgsql8/defaultd
-l
/opt/local/var/log/psql8/
start

RunAtLoad

ServiceDescription
PostgreSQL Server
UserName
postgres8

[1]: http://openacs.org/blog/one-entry?entry_id=296430

Technorati Tags: , ,

2 comments on ‘Start postgres with launchd on OS X’

  1. [...] If you’ve been having problems with PostgreSQL starting up on Mac OS X take a look at this example plist for PostgreSQL that is used by Launchd. Launchd manages daemon processes on Mac OS X, both system wide and for individual users. [...]

Leave a Reply

  1. Subscribe to this comment