private function createNewConnection($addToPool = true, $params = [])
    {
        // no idle connections were found - spin up new one
        $params = ArrayHelper::merge($this->connectionParams, $params);
        $connection = new pgConnection($params, $this->loop, $this->connector);
        if (!$addToPool || $this->autoDisconnect) {
            return $connection;
        }

        $this->connections[] = $connection;

        $connection->on('close', function() use ($connection) {
            $this->connections = array_filter($this->connections, function($c) use ($connection) {
                return $connection !== $c;
            });
            $this->connections = array_values($this->connections);
        });

        return $connection;
    }