Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 7927E633127 for ; Mon, 13 Sep 2010 11:17:25 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 49679-01 for ; Mon, 13 Sep 2010 14:17:16 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by mail.postgresql.org (Postfix) with ESMTP id D8B24632759 for ; Mon, 13 Sep 2010 11:17:17 -0300 (ADT) Received: from mail63.csoft.net (localhost [127.0.0.1]) by mail63.csoft.net (Postfix) with ESMTP id EDADC28421; Mon, 13 Sep 2010 10:17:14 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=csoft.net; h=date:from:to :cc:subject:in-reply-to:message-id:references:mime-version :content-type; s=sel1; bh=qIYSoOC8ZjidkApfVbu+6YHNC8g=; b=eIGx7g LvGgZZbW9iSeutVfzPYPUSdiNDUhbg4jRJCrYFtOisPLuAFFVKEvjT/s0Lo37sX8 uVbLOciqjI83hKs9Y1XnXQS4xcebwKSa3AZMjPuIah06gSYIccHvzjc0UcUARic8 t4GdUVIe2ukq4ilvzcm7+Gxh4diqlrahYERss= Received: from leary.csoft.net (leary.csoft.net [205.205.214.5]) by mail63.csoft.net (Postfix) with ESMTP id E242128406; Mon, 13 Sep 2010 10:17:14 -0400 (EDT) Received: by leary.csoft.net (Postfix, from userid 1112) id 97C16A3B3; Mon, 13 Sep 2010 10:17:14 -0400 (EDT) Date: Mon, 13 Sep 2010 10:17:14 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Kim Bisgaard cc: pgsql-jdbc@postgresql.org Subject: Re: Synchronisation problems in COPY IN In-Reply-To: <4C8E1564.80405@alleroedderne.adsl.dk> Message-ID: References: <4C8E1564.80405@alleroedderne.adsl.dk> User-Agent: Alpine 2.00 (BSO 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201009/21 X-Sequence-Number: 20891 On Mon, 13 Sep 2010, Kim Bisgaard wrote: > We are occasionally experiencing problems with our JDBC implementation of > COPY IN. > > We have cut our program down to the attached example. Do you get the failure you've shown from this example? I get another failure from the connection being close before the last copy thread can complete its write operation. This seems like an expected failure, but I can't reproduce yours. org.postgresql.util.PSQLException: Database connection failed when canceling copy operation at org.postgresql.core.v3.QueryExecutorImpl.cancelCopy(QueryExecutorImpl.java:796) at org.postgresql.core.v3.CopyOperationImpl.cancelCopy(CopyOperationImpl.java:32) at org.postgresql.copy.CopyManager.copyIn(CopyManager.java:150) at org.postgresql.copy.CopyManager.copyIn(CopyManager.java:126) at EvejrDBCopy.run(EvejrDBCopy.java:34) > We use PostgreSQL 8.4, and JDBC 8.4-702. > Your stacktrace shows that you are using 8.4-701, not 702. 702 had some fixes to the copy code when using a Reader, but your code shows you are using an InputStream, so those changes shouldn't be relevent. Kris Jurka