psql command line restart postgres code example
Example 1: restart postgres ubuntu
sudo service postgresql restart
Example 2: postgresql server restart
sudo service postgresql start
sudo service postgresql restart
sudo service postgresql start