Postgres FATAL: could not open relation mapping file I installed postgress.app on mac os
when I try to connect to console :
psql -h localhost
I got this problem .


  psql -h localhost psql: FATAL:  could not open relation mapping file
  "global/pg_filenode.map": No such file or directory


Any ideas how to solve this ?
I had the same error when I tried to reinstall PostgreSQL on RHEL6 using a Chef cookbook. In my case this seems to have been due to an incorrect manual uninstallation of PostgreSQL. I used this command to find the offending files that disrupted my installation:

find / -user postgres  


And then I deleted all the files I found as they were owned by postgres and I did not even have a postgres user. To be on the safe side I also rebooted the machine and after that it worked like a charm.