Received: from maia.hub.org (maia-4.hub.org [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 63F76632AE8 for ; Sun, 23 May 2010 02:13:42 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 46804-01 for ; Sun, 23 May 2010 05:13:34 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.postnewspapers.com.au (www.postnewspapers.com.au [202.4.227.11]) by mail.postgresql.org (Postfix) with ESMTP id CC21E632778 for ; Sun, 23 May 2010 02:13:34 -0300 (ADT) Received: from mail.postnewspapers.com.au (202-89-185-120.static.dsl.amnet.net.au [202.89.185.120]) by www.postnewspapers.com.au (Postfix) with ESMTP id 9E0AFA2AB; Sun, 23 May 2010 13:13:32 +0800 (WST) Received: from localhost (localhost [127.0.0.1]) by mail.postnewspapers.com.au (Postfix) with ESMTP id F32E4AF42A; Sun, 23 May 2010 13:12:41 +0800 (WST) X-Virus-Scanned: Debian amavisd-new at postnewspapers.com.au Received: from mail.postnewspapers.com.au ([127.0.0.1]) by localhost (mail.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id RFzM77t4b6W7; Sun, 23 May 2010 13:12:36 +0800 (WST) Received: from [10.1.1.8] (124-148-217-247.dyn.iinet.net.au [124.148.217.247]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Craig Ringer", Issuer "POST Certificate Authority" (verified OK)) by mail.postnewspapers.com.au (Postfix) with ESMTPSA id 9BF5BAE382; Sun, 23 May 2010 13:12:36 +0800 (WST) Message-ID: <4BF8B972.80803@postnewspapers.com.au> Date: Sun, 23 May 2010 13:13:22 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100423 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 To: Hernan Danielan CC: pgsql-jdbc@postgresql.org Subject: Re: Error in connector or driver with big bytea References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.51 tagged_above=-10 required=5 tests=BAYES_05=-0.5, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/67 X-Sequence-Number: 20551 On 23/05/10 03:03, Hernan Danielan wrote: > Hello! I have a problem for several days now. I am trying to insert a > record with a file of 1.4MB in a postgre database with a JDBC connector. > When i insert files around 100KB it works great. However it does not > work with greater ones. I use both method bytea and oid but both of them > give me the same error in the database log: > > > 2010-05-22 15:30:44 ART LOCATION: exec_bind_message, postgres.c:1769 > 2010-05-22 15:30:44 ART LOG: 08006: could not send data to client: > Connection reset by peer > 2010-05-22 15:30:44 ART LOCATION: internal_flush, pqcomm.c:1108 > ..... > 2010-05-22 15:30:45 ART LOCATION: exec_execute_message, postgres.c:1988 > 2010-05-22 15:30:46 ART LOG: 08006: could not send data to client: > Broken pipe > 2010-05-22 15:30:46 ART LOCATION: internal_flush, pqcomm.c:1108 > .... > 2010-05-22 15:35:10 ART LOG: 00000: aborting any active transactions > > > With the following code Can you supply a *fully* stand-alone test case? And make sure it still encounters the problem on your server? Also, in your test case, when the JDBC driver throws, don't catch the exception. Let it propagate out to terminate the program so that the JRE prints detailed exception info on all nested exceptions. -- Craig Ringer