title: Postgres is failing with 'could not open relation mapping file "global/pg_filenode.map" '
body: <p>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.</p>
  <ol>
  <li>I have postgres 9.0.4 installed with homebrew</li>
  <li>I am running on OS X 10.6.8 (Snow Leopard)</li>
  </ol>
  <p>I can start and stop the server</p>
  <pre><code>$ pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
  server starting
  </code></pre>
  <p>If I try to stop though</p>
  <pre><code>$ pg_ctl -D /usr/local/var/postgres stop -s -m fast
  pg_ctl: PID file &quot;/usr/local/var/postgres/postmaster.pid&quot; does not exist
  Is server running?
  </code></pre>
  <p>Ok this is missing</p>
  <pre><code>$ ls -l /usr/local/var/postgres/ | grep postmaster
  $
  </code></pre>
  <p>But it is definitely running</p>
  <pre><code>$ ps aux | grep postgres
  pschmitz   303   0.9  0.0  2445860   1428   ??  Ss    3:12PM   0:02.46 postgres: autovacuum launcher process       
  pschmitz   304   0.9  0.0  2441760    428   ??  Ss    3:12PM   0:02.57 postgres: stats collector process       
  pschmitz   302   0.0  0.0  2445728    508   ??  Ss    3:12PM   0:00.56 postgres: wal writer process       
  pschmitz   301   0.0  0.0  2445728    560   ??  Ss    3:12PM   0:00.78 postgres: writer process       
  pschmitz   227   0.0  0.1  2445728   2432   ??  S     3:11PM   0:00.42 /usr/local/Cellar/postgresql/9.0.3/bin/postgres -D /usr/local/var/postgres -r /usr/local/var/postgres/server.log
  </code></pre>
  <p>And if I try to access or use it I get this.</p>
  <pre><code>$psql
  psql: FATAL:  could not open relation mapping file &quot;global/pg_filenode.map&quot;: No such file or directory
  </code></pre>
  <p>But global/pg_filenode.map definitely exists in</p>
  <pre><code>$ls -l /usr/local/var/postgres/
  
  ...
  -rw-------  1 pschmitz  staff   8192 Sep 16 15:48 pg_control
  -rw-------  1 pschmitz  staff    512 Sep 16 15:48 pg_filenode.map
  -rw-------  1 pschmitz  staff  12092 Sep 16 15:48 pg_internal.init
  </code></pre>
  <p>I have attempted to uninstall and reinstall to no effect. Any ideas on how I can solve this?
  It has pretty much prevented me from getting anything done today.</p>