Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
In Linux, it can be done by
My OSX is not a server app.
I think it it can be done by
ALTER USER postgres with password '1234'; postgreQSL prompt but I am not sure if it is the meant way.
How can you restart the PostgreSQL server in OSX?
asked Jul 3, 2015 at 12:44
Léo Léopold Hertz 준영Léo Léopold Hertz 준영
5,9741818 gold badges6262 silver badges103103 bronze badges
Manually Start PostgreSQL:
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
Manually Stop PostgreSQL:
pg_ctl -D /usr/local/var/postgres stop -s -m fast
This stackoverflow discussion really goes into some great detail, with many more options. I used it to create an alias to just run:
answered Jul 3, 2015 at 14:16
3,78022 gold badges1717 silver badges2222 bronze badges
Brew has that covered:
brew services restart postgresql
answered Mar 31, 2017 at 22:44
Nikita VolkovNikita Volkov
1,23222 gold badges88 silver badges77 bronze badges
I'm on a brew install email@example.com for legacy reasons, and actually needed to:
# First, close all connections, e.g. application servers and psql connections, then
brew services stop postgres
brew services start postgres
answered Aug 26, 2019 at 7:58
12122 bronze badges
You must log in to answer this question.
Not the answer you're looking for? Browse other questions tagged