pg connection retries with backoff