Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8891401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:44:05+00:00 2026-06-14T22:44:05+00:00

Upon restarting my Mac I got the dreaded Postgres error: psql: could not connect

  • 0

Upon restarting my Mac I got the dreaded Postgres error:

psql: could not connect to server: No such file or directory
 Is the server running locally and accepting
 connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

The reason this happened is because my macbook froze completely due to an unrelated issue and I had to do a hard reboot using the power button. After rebooting I couldn’t start Postgres because of this error.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T22:44:07+00:00Added an answer on June 14, 2026 at 10:44 pm

    WARNING: If you delete postmaster.pid without making sure there are really no postgres processes running you, could permanently corrupt your database. (PostgreSQL should delete it automatically if the postmaster has exited.).

    SOLUTION: This fixed the issue–I deleted this file, and then everything worked!

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

    —

    and here is how I figured out why this needed to be deleted.

    1. I used the following command to see if there were any PG processes running. for me there were none, I couldn’t even start the PG server:

      ps auxw | grep post
      
    2. I searched for the file .s.PGSQL.5432 that was in the error message above. i used the following command:

      sudo find / -name .s.PGSQL.5432 -ls
      

    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".

    1. I took a look at my server logs and saw the following error:

      cat /usr/local/var/postgres/server.log
      

    at 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
        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".
    
    1. Following the advice in the error message, I deleted the postmaster.pid file in the same directory as server.log. This resolved the issue and I was able to restart.

    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. Deleting this file resolved. Lots of people have similar issues but most the answers had to do with file permissions, whereas in my case things were different.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

HUMAN ERROR. THE CODE BELOW DOES NOT HAVE ERROR Moderators: Please remove this. If
Expanding upon my earlier problem , I've decided to (de)serialize my config file class
Upon user login I check their roles. If they have no roles I want
Upon visiting an older site it can be common to find deprecated tags and
Upon considering the driver side implementation for DirectX API on windows systems for modern
Upon coding, I realized I had made a mistake. I used git checkout 7e57dbf5a7245...
Upon installation of a Windows Service, an application is using a custom action to
Upon submit I am trying to have quiz hide and have thanks be shown.
Upon a certain user action, I wish to add to my UIViewController another UIView
Upon reviewing a bunch of MVC style web applications, I'm noticing that it's common

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.