postgres, ubuntu how to restart service on startup? get stuck on clustering after instance reboot

Solution 1:

On Ubuntu 18.04:

sudo systemctl restart postgresql.service

Solution 2:

The below command worked for me

sudo service postgresql restart