How to restart PostgreSQL server on MacOS?

后端 未结 3 2034
终归单人心
终归单人心 2021-01-01 17:46

I tried the following and it failed

bash-3.2$ pg_ctl restart
pg_ctl: no database directory specified and environment variable PGDATA unset
<
3条回答
  •  没有蜡笔的小新
    2021-01-01 18:28

    If you used brew you could find the restart(start|stop) instructions by doing a brew info postgresql Some issues that happen stem from the fact I've seen the plist not load, on OS startup, for some reason. I always forgot what to do and this helped.

    on my Postgres 9.2 brew recipe it had:

    launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
    launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
    

提交回复
热议问题