5/18/2023 0 Comments Macos server will not diconnectLots of people have similar issues but most the answers had to do with file permissions, whereas in my case things were different. So, it seems that my macbook freezing and being hard-rebooted caused Postgres to think that it's processes were still running even after reboot. This resolved the issue and I was able to restart. Following the advice in the error message, I deleted the postmaster.pid file in the same directory as server.log.HINT: If you're sure there are no old server processes still running, remove the shared memory block or just delete the file "postmaster.pid". I took a look at my server logs and saw the following error: cat /usr/local/var/postgres/server.logĪt the end of the server log I see the following error: FATAL: pre-existing shared memory block (key 5432001, ID 65538) is still in use This didn't show anything after searching my whole computer so the file didn't exist, but obviously psql "wanted it to" or "thought it was there". i used the following command: sudo find / -name. s.PGSQL.5432 that was in the error message above. for me there were none, I couldn't even start the PG server: ps auxw | grep post I used the following command to see if there were any PG processes running. SOLUTION: This fixed the issue-I deleted this file, and then everything worked! /usr/local/var/postgres/postmaster.pidĪnd here is how I figured out why this needed to be deleted. (PostgreSQL should delete it automatically if the postmaster has exited.). WARNING: If you delete postmaster.pid without making sure there are really no postgres processes running you, could permanently corrupt your database.
0 Comments
Leave a Reply. |