uncomplicated queries and tests replication lag are merely a Exclusive scenario of running arbitrary SQL queries as a health check, so we just centered on this one particular and applied the Other people like a method https://www.ralantech.com/postgresql-database-health-check-consulting-service/