Query to check postgresql database status

Viewed 19822

Is there any query to check the database status? I just want to know if it is active or not on the remote host.So, Is there any query which return 200 OK if db is running and other db detail?

2 Answers
systemctl status postgresql

was what I was looking for

Related