Postgres.app Could not start on port 5432

后端 未结 24 1097
暗喜
暗喜 2021-01-29 22:24

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:

24条回答
  •  情歌与酒
    2021-01-29 23:16

    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:

    1. Make sure postgres.app is not running.
    2. Run rm ~/Library/Application\ Support/Postgres/var-9.$X/postmaster.pid
    3. If you don't have a var-9.$X directory, just run rm ~/Library/Application\ Support/Postgres/postmaster.pid
    4. Restart postgres.app
    5. Get back to developing cool stuff.

提交回复
热议问题