Working with PostgreSQL, and how I solved a problem

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.

  1. Google the error and technology I’m using
  2. Read the content that appears
  3. 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:

  1. Noticed an issue I didn’t know how to solve
  2. I entered the error in Google with the technology listed
  3. I researched solutions for ease of understanding and intuition on its effectiveness
  4. I implemented it in my project

 

Hopefully, these steps will help you get unstuck in your projects!

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s