I recently installed PostGIS on my Mac (El Capitan 10.11.4, Postgres - version 9.5.1) using Homebrew and I follow these instructions - http://morphocode.com/how-to-install-postgis-on-mac -os-x /
When I try to start Postgres using
pg_ctl -D /usr/local/var/postgres start
I get the following error:
$ FATAL: lock file "postmaster.pid" already exists HINT: Is another postmaster (PID 280) running in data directory "/usr/local/var/postgres"?
So, I spent several hours learning how to handle this, but to no avail.
It is noteworthy that I tried to kill the PID, as recommended in the answer to Superuser - https://superuser.com/questions/553045/fatal-lock-file-postmaster-pid-already-exists- (in the above example I ran kill 208 ), but as soon as I tried to start Postgres again,
I got the same error, albeit with a different PID number. I saw that some people recommended deleting the postmaster.pid file, but it seems to me that maybe I should save this as a last resort ...
Admittedly, Iβm not sure how to fix this, because I donβt quite understand what a postmaster is - Iβm just starting to learn about all this.
Moving to the Postgres database using the psql db_name works psql db_name fine, for what it's worth it.
source share