Cora Hays-Magan

An enthusiastic coder

Problems Repeat Themselves

aka: Document Solution or you will repeat the search

March 1, 2017

Dear Future Self,

You got this message again?

screen shot of terminal with PG_Connection Error

Yes, you have see it before.

Here's steps to debug:

  1. Check that the PID isn't still running and kill -9 it if running
  2.           ps auxwww | grep postgres   - no processes running
              pg_ctl -D /usr/local/var/postgres status   - Checks the status of the server
              kill -9 *PID NUMBER*
  3. Didn't work? Postgres's setup and/or configuration could be corrupted so brew will remove the old setup, overwrite any corrupted files or paths, and then install postgres, link it, and start the service.
  4. Try brew

    1. brew uninstall postgres
    2. brew install postgres
    3. brew postinstall postgresql
    4. brew doctor
    5. brew link postgresql or brew link --overwrite postgresql
    6. brew services start postgresql

Update if other errors or solutions are found or else you will pay.

Best of luck,

Past Self