Fixes #4528: change query to check database status
Merge pull request #321 from ncharles/ust_4428/dev/4528_change_query_to_postgres

Fixes #4528: change query to check database status