I\'m having an issue with my install of postgres in my development environment and I need some help diagnosing it. I haven\'t yet had any luck in tracking down a solution.
My solution to this problem:
I am running postgresql-9.3
My plist file is in the following directory:/Library/LaunchDaemons/com.edb.launchd.postgresql-9.3.plist
Step 1 will stop postgres
1. $ sudo launchctl stop com.edb.launchd.postgresql-9.3
Start postgres using the following command (can find this location using $ brew info postgres)
2. $ postgres -D /usr/local/var/postgres
I had an old value of PGDATA confusing things.
I am not sure what the source of my original problem was with 9.0.3 because I was getting this problem:
psql: FATAL: could not open relation mapping file "global/pg_filenode.map": No such file or directory
However as stated above it turns out that the running process was for my previous postgres install of 9.0.3
I believe I had an old version org.postgresql.postgres.plist in ~/Library/LaunchAgents/
I had to:
initdb /usr/local/var/postgres
and now I have it up and working.
ps aux | grep postgres
revealed I had another instance of postgres running on a temp data directory from a previous test run. Killing this process fixed the problem.
I just encountered this problem. Solved it by setting the owner of the postgres data directory to the unprivileged postgres user.