With most of the open source projects I work with, I use PostgreSQL. It’s a favorite in the open source community because it’s free and easy to use. I never really liked working with it because I couldn’t find a nice SQL client to use with it until recently. The client is called PSequel. It reminds me of Sequel Pro, which I use with MySQL.
Anywho, I wanted to share an issue I run into from time to time.
I’ll be working on a project and run into an error on the Postgres database saying something to the tune of “Could Not Start On Port 5432”. When I run into issues like this, here is how I normally solve it.
- Google the error and technology I’m using
- Read the content that appears
- Pick the best solution after reading and implement it in my project
I found this article on StackOverflow.
Some people suggested uninstalling Postgres and then reinstalling, others suggested this complicated configuration change. To me, uninstalling and reinstalling didn’t seem like the best path and usually, best practice solutions aren’t that complicated. So I immediately continued to read on to find a solution that seemed simple and easy to understand.
That’s when I found this command in the article:
brew services stop postgresql
The writer explained that if you ran that command, the issue would clear up. It seemed pretty clear to me so I gave it a try. I ran the command in the terminal and reopened Postgres and the issue was gone! All from ten minutes of Google searching!
So to recap I:
- Noticed an issue I didn’t know how to solve
- I entered the error in Google with the technology listed
- I researched solutions for ease of understanding and intuition on its effectiveness
- I implemented it in my project
Hopefully, these steps will help you get unstuck in your projects!