On Jan 31, 2012, at 2:52 PM, Scott Frankel wrote: > % sudo su postgres -c "/opt/local/lib/postgresql84/bin/pg_ctl -D > /opt/local/var/postgresql84/defaultdb -l > /opt/local/var/postgresql84/defaultdb/data/logfile.txt start"
> 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 This looks like you are pointing to a different directory than the one you set up when you installed postgresql84-server (and also a different one than the one you're pointed to when you manually start postgres). > 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? If you look at the plist that macports installed, you'll see that it uses a wrapper script to launch the postgres server process. That script will default to using the environment variable $POSTGRESQL84DATA for the data dir (and fall back on the one you show that you're using). It's very likely that you have $POSTGRESQL84DATA set, and you don't want it set. -- Daniel J. Luke +========================================================+ | *---------------- dl...@geeklair.net ----------------* | | *-------------- http://www.geeklair.net -------------* | +========================================================+ | Opinions expressed are mine and do not necessarily | | reflect the opinions of my employer. | +========================================================+ _______________________________________________ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users