Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1abWDk-0002ER-My for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Mar 2016 16:35:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1abWDk-0004aG-1w for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Mar 2016 16:35:24 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1abWDi-0004ZX-PU for pgsql-hackers@postgresql.org; Thu, 03 Mar 2016 16:35:22 +0000 Received: from ks311736.kimsufi.com ([188.165.209.130]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1abWDf-0007vO-Md for pgsql-hackers@postgresql.org; Thu, 03 Mar 2016 16:35:21 +0000 Received: from genius-map.net (verite.pro [195.154.189.246]) by ks311736.kimsufi.com (Postfix) with ESMTP id 42B71C023C; Thu, 3 Mar 2016 17:53:35 +0100 (CET) Received: by genius-map.net (Postfix, from userid 1001) id CFD1C38A1EB7; Thu, 3 Mar 2016 17:19:57 +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: "Tom Lane" CC: "Alvaro Herrera" ,"Robert Haas" ,"Jim Nasby" ,"Ronan Dunklau" ,"pgsql-hackers" In-Reply-To: <27428.1456868923@sss.pgh.pa.us> Date: Thu, 03 Mar 2016 17:19:55 +0100 Message-ID: <7c0836cc-ae43-445e-9c83-ab569e2525df@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 Tom Lane wrote: > BTW, is anyone checking the other side of this, ie "COPY IN" with equally > wide rows? There doesn't seem to be a lot of value in supporting dump > if you can't reload ... Indeed, the lines bigger than 1GB can't be reloaded :( My test: with a stock 9.5.1 plus Alvaro's patch with my additional int64 fix mentioned upthread, creating this table and filling all columns with 200MB of text each: create table bigtext(t1 text ,t2 text, t3 text, t4 text, t5 text, t6 text, t7 text); # \copy bigtext to '/var/tmp/bigtext.sql' That part does work as expected, producing this huge single line: $ wc /var/tmp/bigtext.sql 1 7 1468006407 /var/tmp/bigtext.sql But reloading it fails: # create table bigtext2 (like bigtext); CREATE TABLE # copy bigtext2 from '/var/tmp/bigtext.sql'; ERROR: 54000: out of memory DETAIL: Cannot enlarge string buffer containing 1073676288 bytes by 65536 more bytes. CONTEXT: COPY bigtext2, line 1 LOCATION: enlargeStringInfo, stringinfo.c:278 # \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 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