How to restart postgresql on OS X?
·
Answer a question
Can't find how to restart postgresql on OS X using command line in order to apply changes in pg_hba.conf. I'v tried various command from web and docs. How to do it right?
EDIT:Response of attempt to find the path looks this way:
TheKotik 73454 0.0 0.0 2619360 804 ?? S 7:20PM 0:01.57 /Applications/Postgres.app/Contents/Versions/9.6/bin/postgres -D /Users/TheKotik/Library/Application Support/Postgres/var-9.6 -p 5432
Answers
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log restart
/usr/local/var/postgres is the location of the database storage area, and /usr/local/var/postgres/server.log is my log file for postgres. The last word restart is the operative word here. You can also use start to start the service.
You can find the location of the database storage area by running ps aux | grep postgres | grep -- -D
更多推荐
所有评论(0)