(works on ubuntu 16.04 or later which use systemd
)
- start -
sudo service postgresql start
- stop -
sudo service postgresql stop
- restart -
sudo service postgresql restart
- auto launch -
sudo systemctl enable postgresql
- disable auto launch -
sudo systemctl disable postgresql
- start manually:
pg_ctl -D /usr/local/var/postgres start
- stop manually:
pg_ctl -D /usr/local/var/postgres stop
- start PostgreSQL server now and relaunch at login:
brew services start postgresql
- stop PostgreSQL:
brew services stop postgresql