FATAL ERROR lock file “postmaster.pid” already exists

后端 未结 7 1752
故里飘歌
故里飘歌 2021-02-03 20:26

I have recently installed PostGIS on my Mac (El Capitan 10.11.4, Postgres is version 9.5.1) using Homebrew, and I am following these instructions - http://morphocode.com/how-to-

7条回答
  •  情话喂你
    2021-02-03 20:52

    Posting this in case it helps someone else:

    I was having this same problem as the OP after a hard reboot when my laptop crashed. What helped me was running the following command to see what PID was associated with postmaster.pid:

    cat /usr/local/var/postgres/postmaster.pid
    

    The first number that appears will be the PID. Looking in Activity Monitor, I was able to see that Postgres was running, but without a PID number that matched the one shown.

    Instead of the steps outlined in the answer referenced on Superuser, I restarted my laptop properly and then opened up Terminal and ran

    brew services restart postgresql
    

    This worked without having to remove postmaster.pid, which I saw a few other posts recommend. Sometimes it's the simple solutions that work.

提交回复
热议问题