Skip site navigation (1) Skip section navigation (2)

Postgres, OS X Tiger, and launchd

From: Nicholas Tulach <ntulach(at)mac(dot)com>
To: pgsql-ports(at)postgresql(dot)org
Subject: Postgres, OS X Tiger, and launchd
Date: 2005-05-07 02:02:44
Message-ID: A8239FB3-183F-40E9-91C4-FC6E1D35D45F@mac.com (view raw or flat)
Thread:
Lists: pgsql-ports
I spent the last few hours attempting to get Postgres to start via  
launchd in OS X Tiger, so I thought I'd share with the community what  
I ended up doing:

I created a file called "org.postgres.PostgreSQL.plist", which I'm  
including at the end of this message.

Simply place the file in the /Library/LaunchAgents folder, restart,  
and Voila!  Your DB server should be running.

Feel free to email me if you've got ?s.

cheers,
-n



Here is the file (between the equals signs at the top and bottom)
====
<?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>GID</key>
     <integer>502</integer>
     <key>GroupName</key>
     <string>postgres</string>
     <key>Label</key>
     <string>org.postgres.PostgreSQL</string>
     <key>OnDemand</key>
     <false/>
     <key>ProgramArguments</key>
     <array>
         <string>/usr/local/pgsql/bin/postmaster</string>
         <string>-D</string>
         <string>/usr/local/pgsql/data</string>
     </array>
     <key>ServiceDescription</key>
     <string>PostgreSQL Database Server</string>
     <key>UID</key>
     <integer>502</integer>
     <key>UserName</key>
     <string>postgres</string>
</dict>
</plist>
====

pgsql-ports by date

Next:From: Tom LaneDate: 2005-05-07 04:46:54
Subject: Re: AIX5.2 compile for PG 8.0.2. -- novice installer
Previous:From: Devrim GUNDUZDate: 2005-05-06 00:04:19
Subject: Re: Anyone doing a 8.0.2-x86_64-RHEL4.rpm?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group