Postgresql got corrupted on OSX - can't start server / connect to database
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



Postgresql got corrupted on OSX - can't start server / connect to database
===

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


