[postgresql] How to restart Postgresql

I have Postgresql 9.3 and 9.4 installed on my Linux Mint machine. How can I restart postgresql 9.4? A method to restart both versions together is also fine.

This question is related to postgresql linux-mint

The answer is


On Windows :

1-Open Run Window by Winkey + R

2-Type services.msc

3-Search Postgres service based on version installed.

4-Click stop, start or restart the service option.

On Linux :

sudo systemctl restart postgresql

also instead of "restart" you can replace : status, stop or status.


You can also restart postgresql by using this command, should work on both the versions :

sudo service postgresql start


This should work:

sudo systemctl stop postgresql

sudo systemctl start postgresql


macOS:

  1. On the top left of the MacOS menu bar you have the Postgres Icon
  2. Click on it this opens a drop down menu
  3. Click on Stop -> than click on start