postgres launch daemon not working

Scott Frankel frankel at circlesfx.com
Tue Jan 31 16:47:09 PST 2012


Hi Ryan,


On Jan 31, 2012, at 12:34 PM, Ryan Schmidt wrote:

> 
> On Jan 31, 2012, at 13:52, Scott Frankel wrote:
> 
>> Jan 31 08:26:02 tiento org.macports.postgresql84-server[1920]: server starting
>> Jan 31 08:29:07 tiento com.apple.SystemStarter[53]: Starting PostgreSQL database server
>> Jan 31 08:29:07 tiento com.apple.SystemStarter[53]: pg_ctl: could not open PID file "/Library/PostgreSQL8/data/postmaster.pid": Permission denied
>> Jan 31 08:29:08 tiento SystemStarter[53]: PostgreSQL database server (90) did not complete successfully
>> 
>> 
>> Looks like pg_ctl is trying to open a postmaster.pid file it doesn't have permissions for.  How can I point launchd invocations of pg_ctl to the correct postgres data dir?  I initialized my db according to info I gleaned from searches; eg:
>> 
>> 	% sudo su postgres \ -c '/opt/local/lib/postgresql84/bin/initdb -D /opt/local/var/postgresql84/defaultdb'
>> 
>> 
>> Prior to that, I reinstated the postgres user name with:
>> 
>> 	% sudo dscl . -append /Users/postgres UniqueID 401
>> 
>> 
>> I assigned the postgres username to UID 401, as my previous installation's postgres files seemed to be owned by user 401 of group postgres.  I wonder if this is the source of the permissions problem.
> 
> It should not have caused a problem, though it was also unnecessary to create your own postgres user, since that (along with creating the server directories, and the launchd plist) is the purpose of installing the postgresql*-server ports.

Good to know.  How would I have been able to find that out myself?  Knowing that ahead of time would've saved me significant effort.


> I'm more concerned about "/Library/PostgreSQL8" -- what is that? That doesn't sound like a normal MacPorts location, though I am not actually familiar with postgres so I could be mistaken.

The /Library/postgreSQL8/ dir is vestigial, left over from an aborted attempt to install postgres a few years ago -- before I knew of macports.  To my knowledge, it's been laying fallow since then.


Thanks
Scott


> 
> 
> 
> 




More information about the macports-users mailing list