services restart postgres code example
Example 1: restart postgresql
sudo /etc/init.d/postgresql restart
Example 2: restart postgreSql from terminal
pg_ctl -D "C:\Program Files\PostgreSQL\12\data" restartCode language: JavaScript (javascript)
sudo /etc/init.d/postgresql restart
pg_ctl -D "C:\Program Files\PostgreSQL\12\data" restartCode language: JavaScript (javascript)