title: psql: could not connect to server: No such file or directory (Mac OS X)
body: <p>Upon restarting my Mac I got the dreaded Postgres error:</p>
  
  <pre><code>psql: could not connect to server: No such file or directory
   Is the server running locally and accepting
   connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
  </code></pre>
  
  <p>The reason this happened is because my macbook froze completely due to an unrelated issue and I had to do a hard reboot using the power button. After rebooting I couldn't start Postgres because of this error.</p>