2

I have to install homebrew in my macOS then after I tried to install Postgres on my mac using the homebrew. but when I checked my Postgres status is it not running.

/usr/local/Cellar/postgresql/11.4/bin/pg_ctl -D /usr/local/var/postgres start 

I have tried with that cmd but it only gives me pg_ctl: could not start server

2019-07-16 18:32:36.148 IST [9541] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2019-07-16 18:32:36.149 IST [9541] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
2019-07-16 18:32:36.162 IST [9541] LOG:  could not open directory "pg_tblspc": No such file or directory
2019-07-16 18:32:36.166 IST [9542] LOG:  database system was interrupted; last known up at 2019-07-14 17:27:00 IST
2019-07-16 18:32:36.350 IST [9542] LOG:  could not open directory "pg_tblspc": No such file or directory
2019-07-16 18:32:36.350 IST [9542] LOG:  could not open directory "pg_tblspc": No such file or directory
2019-07-16 18:32:36.350 IST [9542] FATAL:  could not open directory "pg_replslot": No such file or directory
2019-07-16 18:32:36.350 IST [9541] LOG:  startup process (PID 9542) exited with exit code 1
2019-07-16 18:32:36.350 IST [9541] LOG:  aborting startup due to startup process failure
2019-07-16 18:32:36.352 IST [9541] LOG:  database system is shut down
 stopped waiting
pg_ctl: could not start server
Examine the log output.

I have tried find some solution but not working for me.

3
  • have you tried: brew services start postgresql ?
    – Chessbrain
    Jul 16, 2019 at 14:02
  • By logs provided by you i think you have delete pg_tblspc and pg_replslot directory from data-diectory of postgresql 11.4 kindly put back those if you can't recover just create it using mkdir pg_tblspc with postgres user permission and start again Jul 19, 2019 at 6:42
  • 1
    @Chessbrain I check that but not working for me Jul 19, 2019 at 16:58

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.