def cancel(self):
    'Cancel the current database operation. This can be called from a\n           different thread than the one currently executing a database operation.\n        '
    if self.closed():
        raise errors.ConnectionError('Connection is closed')
    self._logger.info('Canceling the current database operation')
    temp_socket = self.establish_socket_connection(self.address_list)
    self.write(CancelRequest(self.backend_pid, self.backend_key), temp_socket)
    temp_socket.close()
    self._logger.info('Cancel request issued')
Cancel the current database operation. This can be called from a
different thread than the one currently executing a database operation.
def cancel(self):
    'Cancel the current database operation. This can be called from a\n           different thread than the one currently executing a database operation.\n        '
    if self.closed():
        raise errors.ConnectionError('Connection is closed')
    self._logger.info('Canceling the current database operation')
    temp_socket = self.establish_socket_connection(self.address_list)
    self.write(CancelRequest(self.backend_pid, self.backend_key), temp_socket)
    temp_socket.close()
    self._logger.info('Cancel request issued')