Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agB71-0007f2-Hr for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Mar 2016 13:03:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1agB71-0000zd-03 for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Mar 2016 13:03:43 +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 1agB5f-0007kH-1R for pgsql-hackers@postgresql.org; Wed, 16 Mar 2016 13:02:19 +0000 Received: from ks311736.kimsufi.com ([188.165.209.130]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agB5Y-0002oj-3Z for pgsql-hackers@postgresql.org; Wed, 16 Mar 2016 13:02:18 +0000 Received: from genius-map.net (verite.pro [195.154.189.246]) by ks311736.kimsufi.com (Postfix) with ESMTP id 781B1C05A1; Wed, 16 Mar 2016 14:20:57 +0100 (CET) Received: by genius-map.net (Postfix, from userid 1001) id AD7C138A1970; Wed, 16 Mar 2016 14:02:09 +0100 (CET) Content-Type: text/plain; charset="iso-8859-15" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: pg_dump / copy bugs with "big lines" ? From: "Daniel Verite" To: "Alvaro Herrera" CC: "Tom Lane" ,"Robert Haas" ,"Jim Nasby" ,"Ronan Dunklau" ,"pgsql-hackers" In-Reply-To: <7c0836cc-ae43-445e-9c83-ab569e2525df@mm> Date: Wed, 16 Mar 2016 14:02:07 +0100 Message-ID: <28a1f376-e006-4ecf-93f5-133737652c5c@mm> X-Mailer: Manitou v1.4.0 X-Pg-Spam-Score: -1.9 (-) 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 Daniel Verite wrote: > # \copy bigtext2 from '/var/tmp/bigtext.sql' > ERROR: 54000: out of memory > DETAIL: Cannot enlarge string buffer containing 1073741808 bytes by 8191 > more bytes. > CONTEXT: COPY bigtext2, line 1 > LOCATION: enlargeStringInfo, stringinfo.c:278 To go past that problem, I've tried tweaking the StringInfoData used for COPY FROM, like the original patch does in CopyOneRowTo.=20 It turns out that it fails a bit later when trying to make a tuple from the big line, in heap_form_tuple(): tuple =3D (HeapTuple) palloc0(HEAPTUPLESIZE + len); which fails because (HEAPTUPLESIZE + len) is again considered an invalid size, the size being 1468006476 in my test. At this point it feels like a dead end, at least for the idea that extending StringInfoData might suffice to enable COPYing such large rows. Best regards, --=20 Daniel V=E9rit=E9 PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers