postgres launch daemon not working
Ryan Schmidt
ryandesign at macports.org
Tue Jan 31 12:34:19 PST 2012
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.
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.
More information about the macports-users
mailing list