This example show you how to start, stop or restart your postgres in mac os.
Browse to your postgres installed folder from terminal.
cd /Library/PostgreSQL/9.3/bin
To restart your postgres
sudo -u postgres ./pg_ctl -D ../data/ restart
To start your postgres
sudo -u postgres ./pg_ctl -D ../data/ start
To stop your postgres
sudo -u postgres ./pg_ctl -D ../data/ stop
Mac OS – Postgres start, stop command