chekc if postgres is runnnin centos 7 code example
Example: how to know status psql in linux
sudo service postgresql status
# To know the status of postgresql
sudo service postgresql status
# To know the status of postgresql