stop psql running code example
Example 1: how to stop psql in linux
sudo service postgresql stop
# To stop the postgresql service
Example 2: stop psql server windows
pg_ctl -D "C:\Program Files\PostgreSQL\9.6\data" stop
sudo service postgresql stop
# To stop the postgresql service
pg_ctl -D "C:\Program Files\PostgreSQL\9.6\data" stop