restart postgres database on ubuntu code example Example: restart postgres ubuntu sudo service postgresql restart