how to shutdown postgres database
On Windows
First, you need to find the PostgreSQL database directory, it can be something like C:Program FilesPostgreSQL10.4data. Then open Command Prompt and execute this command:
pg_ctl -D "C:Program FilesPostgreSQL9.6data" start
To stop the server
pg_ctl -D "C:Program FilesPostgreSQL9.6data" stop
To restart the server:
pg_ctl -D "C:Program FilesPostgreSQL9.6data" restart
Another way:
Open Run Window by Winkey + R
Type services.msc
Search Postgres service based on version installed.
Click stop, start or restart the service option.