0

I already install PostgreSQL using homebrew "brew install postgresql". But after that, I will start the service of the Postgres service its give me some error message.

pg_ctl -D /usr/local/var/postgres start

waiting for server to start....2019-04-28 11:59:51.107 IST [9563] LOG: listening on IPv6 address "::1", port 5432 2019-04-28 11:59:51.107 IST [9563] LOG: listening on IPv4 address "127.0.0.1", port 5432 2019-04-28 11:59:51.109 IST [9563] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432" 2019-04-28 11:59:51.119 IST [9563] LOG: could not open directory "pg_tblspc": No such file or directory 2019-04-28 11:59:51.123 IST [9564] LOG: database system was shut down at 2019-03-31 19:13:06 IST 2019-04-28 11:59:51.123 IST [9564] LOG: could not open directory "pg_tblspc": No such file or directory 2019-04-28 11:59:51.123 IST [9564] FATAL: could not open directory "pg_replslot": No such file or directory 2019-04-28 11:59:51.124 IST [9563] LOG: startup process (PID 9564) exited with exit code 1 2019-04-28 11:59:51.124 IST [9563] LOG: aborting startup due to startup process failure 2019-04-28 11:59:51.125 IST [9563] LOG: database system is shut down stopped waiting pg_ctl: could not start server Examine the log output.

And I also not find out the pg_hba.conf file to change's socket related issue.

3
  • I used to struggle with problems like this, then I discovered postgresapp.com No, no connection, just a happy user. Apr 28, 2019 at 11:30
  • Can you please replace the error message part by copying/pasting directly from Terminal and then applying code formatting to the whole block (the {} icon on top of the edit window)? Right now it's extremely hard to read.
    – nohillside
    Apr 28, 2019 at 12:33
  • 1
    Also, have you used Postgres before? By default a newly installed Progress just starts up empty, yours seems to know about a tablespace file already. You may also want to check the permissions of /usr/local/var/postgres and its content to make sure the current user (the one calling pg_ctl is allowed to access it.
    – nohillside
    Apr 28, 2019 at 12:34

1 Answer 1

1

Normally this should do the trick:

"pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start" Without the " " of course.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .