Custom metric for postgresql to monitor the replication delay