![]() pid files ? Please note that brew services restart postgres does not resolve the issue - only the removal of the old. Most likely there will be a directory called var-11. cd Library/Application\ Support/Postgres Type ls to view the files in your Postgres directory. Right click on the file and select Move to Bin This should open the data directory of your PostgreSQl installation. Open your terminal and make sure youâre in the home directory. After deleting the file, opening or making the Postgres GUI app window have focus will change the error message from stale postmaster.pid file to Not running. My question is, why must be this done intermittently and can one automate the removal of old. Click Start button on Postgres GUI app to start PostgreSQL server. ![]() The main cause for the pid file is that NEVER EVER two different copies of the postmaster start upon the same database cluster. PID file in the data directory "confuses" postgres and so it must be removed. Normally its save to delete the pid if the process noted in there is not postgres anymore. According to the documentation, having an old. Which allows me to connect to the database. When this happens, I have gotten used to the practice of opening the terminal, then running rm -f /usr/local/var/postgres/postmaster.pid Is the server running on host "localhost" (127.0.0.1) and accepting Is the server running on host "localhost" (::1) and acceptingĬould not connect to server: Connection refused You can delete the postmaster.pid file if you make sure that no process named postgres or postmaster is running anymore. (Keep in mind the version might change, var-12, might be var-13 etc) Open your terminal, and cd into the postgres directory: cd /Users//Library/Application\ Support/Postgres. If it was created 1.5 years ago you either haven't restarted PostgreSQL in a very long time, or the server was shut down ungracefully and wasn't started in a long time.Every once in a while (~ every 5 times I reboot the computer), I face the following error when I try to connect to my local database instance: could not connect to server: Connection refused The problem is that the postmaster.pid file needs to be removed manually and regenerated by postgres, and these are the steps to do it. I am running PostgreSQL on my localhost on MacOS.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |