Where is my postgres.server start and stop command for mac?

Are you struggling shutting down your postgres ?

You are not alone. It took me only 30 minutes to find the the way out.

I know that I will forget the same in the future, or anyone else having the same question then you must read this.

Open Terminal command and run:

> vi ~/.bash_profile

copy and paste this command:

> alias postgres.server="sudo -u postgres /Library/PostgreSQL/9.4/bin/pg_ctl -D /Library/PostgreSQL/9.4/data"

PS: replace 9.4 with the PostgreSQL version that you are running.

Reload bash_profile

> source ~/.bash_profile

Now you should be able to command the following:

> postgres.server start


> postgres.server stop
PS: You may need to enter admin password as you are starting or shutting down the sever for all user (hopefully its only you for your machine :-) ).