Postgres locks not granted check + metric