I\'m using http://postgresapp.com. In the menubar it gives the error \" Could not start on port 5432.\" Similarly if I try to start the server from the terminal, I get:
I have tried just about every solution to this problem that is out there. For me it always happens when my MacBook's battery dies, even if the computer is already sleeping. I was poking around in ~/Library/Application\ Support/Postgres/var-9.4
and I discovered another postmaster.pid
file that I had not seen before. I deleted it, and now everything is back up and running! I am running the Postgres.app version, not the brew version.
Steps I took:
postgres.app
is not running.rm ~/Library/Application\ Support/Postgres/var-9.$X/postmaster.pid
var-9.$X
directory, just run rm ~/Library/Application\ Support/Postgres/postmaster.pid
postgres.app