Wrap requests with a pg connection.