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 8230285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:04:50+00:00 2026-06-07T17:04:50+00:00

I have a Postgresql installed via Homebrew and after a crash I can not

  • 0

I have a Postgresql installed via Homebrew and after a crash I can not start server anymore..

if I do

 $ pg_ctl start 

I get

pg_ctl: no database directory specified and environment variable PGDATA unset

If I do

$ pg_ctl -D /Library/PostgreSQL/data start

I get

pg_ctl: could not open PID file "/Library/PostgreSQL/data/postmaster.pid": Permission denied

Everything was working just fine and then.. out of the blue, this.

The data folder above has permissions set at “Everything” for postgres user and “None” for everyone..

Path looks fine (in my ~/.bash_profile)

export PATH=/usr/local/bin:$PATH
  • 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-07T17:04:53+00:00Added an answer on June 7, 2026 at 5:04 pm

    When you first started Pg, did you let homebrew start it for you, or did you manually start it with pg_ctl ? I ask because I’m guessing you probably need to start and stop Pg using homebrew scripts and/or using launchd rather than directly via pg_ctl. I don’t use homebrew (or Mac OS X much) but a quick search suggests that homebrew installs of Pg are usually started and stopped via launchd and ~/Library/LaunchAgents/org.postgresql.postgres.plist .

    If you want to manage it manually:

    What user does homebrew usually run PostgreSQL as? If you’re launching Pg via pg_ctl you need to run it as the right user. From vague memory of other discussion I’ve seen about homebrew here, it’s probably a user named postgres or postgres_ . Double-check using:

    ls -ld /Library/PostgreSQL/data
    

    and see what the owning user is, then run:

    sudo -u postgres_ pg_ctl -D /Library/PostgreSQL/data start
    

    … replacing “postgres_” with the owner of the datadir.

    I suspect the reason you’re getting permissions errors is that you probably didn’t recursively apply the changes. Please don’t; run Pg as the correct user instead.

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

Sidebar

Related Questions

I have a lovely PostgreSQL 9.0 server installed on my laptop via MacPorts. I
I have a Tomcat and PostgreSQL installed on a server. I'm having a connection
I have a postgreSQL Server with some databases. Every user can only connect to
I have installed PostgreSQL on my FreeBSD 8.2 box. How can I open the
I have installed OpenSUSE 12.1 installed on machine. and i have postgresql-contrib-8.3.11-0.1.i586.rpm,postgresql-devel-8.3.11-0.1.i586.rpm, postgresql-docs-8.3.11-0.1.i586.rpm,postgresql-libs-8.3.11-0.1.i586.rpm,postgresql-server-8.3.11-0.1.i586.rpm.. I
I have a little silly question. I have installed a PostgreSQL DB Server, but
I have a problem in a cloud server Fedora 16 x64. I've installed PostgreSQL
I have recently installed PostgreSQL on Ubuntu with the EnterpriseDB package. I can connect
I have a postgresql database and am using it for a project which handles
Background: I have a PostgreSQL (v8.3) database that is heavily optimized for OLTP. I

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.