You can do this by running brew services stop postgresql and then waiting for the result of brew services list to show posgres is in the stopped state. (might take a while) > Successfully stopped postgresql (label: ) > Moving postgresql data from /usr/local/var/postgres to /usr/local/var/postgr The files belonging to this database system will be owned by user 'mariacam'. Just remove the PID file rm /usr/local/var/postgres/postmaster.pid and start postgres brew services start postgresqlĪ word of warning: do not delete this PID file unless you are sure that postgres is not running. brew postgresql-upgrade-database > Upgrading postgresql data from 10 to 11. This was because I had to hard shutdown my Mac and postgres didn't get a chance to cleanup the PID file. 11:51:16.078 GMT HINT: Is another postmaster (PID 601) running in data directory "/usr/local/var/postgres"? 11:51:16.078 GMT FATAL: lock file "postmaster.pid" already exists 10.3k 1 1 gold badge 24 24 silver badges 29 29 bronze badges. You should see the value of StandardErrorPath listed as: StandardErrorPathĪnd then you should tail the end of the log file using tail -n 100 /usr/local/var/log/postgres.log brew postgresql-upgrade-database That will solve the problem by upgrading your existing databases to the version you upgraded postgres to. You can check the plist file for the postgres service using brew services list to find the location of the file and just opening it up in you favourite editor. I would combine the two answers from Wilson and Grasshopper here. So, I removed that file rm /usr/local/var/postgres/postmaster.pid HINT: Is another postmaster (PID 1489) running in data directory "/usr/local/var/postgres"? Finally, a new version of PostgreSQL means new versions of the native libraries that are used by the Ruby pg gem. Sure enough, FATAL: lock file "postmaster.pid" already exists Uninstall PostgreSQL 9.2.4: brew cleanup postgresql 8. ![]() Then I thought, hmm maybe there's something in that log file, tail -n 10 /usr/local/var/log/postgres.log Output from this command, => Successfully stopped `postgresql` (label: ) To fix it I ran, brew services restart -vvv postgresql postgres stopped accepting connections though homebrew thought it was running.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |