Fix Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432?
Most likely it's because your system shutdown unexpectedly Try
postgres -D /opt/homebrew/var/postgres # for Intel M1
postgres -D /usr/local/var/postgres # for Silicon
You might see
FATAL: lock file "postmaster.pid" already exists
HINT: Is another postmaster (PID 449) running in data directory "/usr/local/var/postgres"?
Then try
kill -9 PID
example
kill -9 449 And it should start postgres normally
About the author
I will raise your revenues or decrease your costs using solutions based on logic and in most cases, it will involve a computer. Design - Build - Improve.
I design solutions to your business problem, build it with you and your team and finally scale the solution to fix other related problems.
I use Javascript and Python as the main languages for development but I am eager and faster to learn anything that would be put a solution on the table.
Comments
Join the discussionNo comments yet. Be the first to comment.
Quick Bits
This series include short articles and tutorials. The purpose of these articles is to help you quickly solve an issue or learn an easy concept.


