Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQxgg-0004k4-E0 for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Jan 2017 14:46:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cQxgg-0006Hn-10 for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Jan 2017 14:46:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cQxgd-0006DR-Qc for pgsql-hackers@postgresql.org; Tue, 10 Jan 2017 14:46:07 +0000 Received: from mail-qk0-x22f.google.com ([2607:f8b0:400d:c09::22f]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cQxga-0003rg-IF for pgsql-hackers@postgresql.org; Tue, 10 Jan 2017 14:46:07 +0000 Received: by mail-qk0-x22f.google.com with SMTP id a20so177100078qkc.1 for ; Tue, 10 Jan 2017 06:46:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=i3OWw9u8f0d7Vm5YbAqYPwQfS3sKeVWwkye9nZIZEFA=; b=RWR24BST0fts+uz4dTX2RZmbUUCLTALSDoKJWOF4kPU6bpo7UCXwinh3ubcNKfR8k4 57iINML8i7SFLIVpU5awH6g62o2eVMPDz7+CQawJqoDzJALFvuExln92sir09hIvvbja UdNa3UU+4XVMTCVcJwVzLzKuH+xZd9XnCcc1mu9Q3O/30ztmNrkG1MBwxEilXXcQ/jVj mpi+3DvM7LXI5bmfwVQibKmvj5n5pGX63wahp3F95T3Z+umLOjSSu952j7RpqWGSy+6X UnNFKSN38Dp3V6HMM7qtFZVVLPMOpgypfHLtf9MzF24Ff6yFRSsw+KjOK4sl5FZN6Plc VT5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=i3OWw9u8f0d7Vm5YbAqYPwQfS3sKeVWwkye9nZIZEFA=; b=oJ7XLD9tXO2dssC/SrL30xGLgGZ7+057mA0Fsd9igNdabeO76y6cB4uuKxo7wwGV4R 6IShU39xVlHmU+Ap8+OOd/22Gc57OPg4zw3D8ochBYusUHsFXO0sE3ie8gIl5sMKWOT0 0KwT0J5YIgvfzfJqmSYCtmnXcF2R4g9a3qjjehHIYTZCaAw/PECDdAW2raoTQ1rOzfjp mi1Jd/TjkFNriWVanRxphBMAzmA7iJWHs1EkCQG5qwpV8eOonR3xOIVWN7WKqIB9xKW0 34MFKTlOGbObMu0SOrSy+gVOLTsvizrvWRgAmsBZlvYy/FYC+GwwUkvxIWan75kKpD3a 28xQ== X-Gm-Message-State: AIkVDXJQ0EYW2/T1DTylAuRgOsVevulAXsTcSq03eFnBgZMerTHzhuvxDdB2uSDFT3yA0ozz X-Received: by 10.55.0.19 with SMTP id 19mr3145032qka.79.1484059562974; Tue, 10 Jan 2017 06:46:02 -0800 (PST) Received: from alvin.alvh.no-ip.org ([181.42.144.42]) by smtp.gmail.com with ESMTPSA id j9sm1545449qtc.23.2017.01.10.06.46.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Jan 2017 06:46:02 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 5B861D46; Tue, 10 Jan 2017 11:46:00 -0300 (CLST) Date: Tue, 10 Jan 2017 11:46:00 -0300 From: Alvaro Herrera To: Daniel Verite Cc: Tomas Vondra , Craig Ringer , Tom Lane , Robert Haas , Jim Nasby , Ronan Dunklau , pgsql-hackers Subject: Re: pg_dump / copy bugs with "big lines" ? Message-ID: <20170110144600.ck2c7kdli33e5hxo@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170110055057.utnaxegvbuwslpex@alvherre.pgsql> User-Agent: NeoMutt/20161104 (1.7.1) X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Alvaro Herrera wrote: > Daniel Verite wrote: > > > My tests are OK too but I see an issue with the code in > > enlargeStringInfo(), regarding integer overflow. > > The bit of comment that says: > > > > Note we are assuming here that limit <= INT_MAX/2, else the above > > loop could overflow. > > > > is obsolete, it's now INT_MAX instead of INT_MAX/2. > > I would keep this comment but use UINT_MAX/2 instead. I rephrased the comment instead. As you say, the current code no longer depends on that, but we will depend on something similar when we enlarge the other variables. With that, pushed and I hope this is closed for good. If you or anyone else want to revisit things so that pg10 can load&dump even larger tuples, be my guest. There are quite a few places that will need to be touched, though (in particular, as I recall, the FE/BE protocol.) -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers