pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Kim Bisgaard <kim+pg@alleroedderne.adsl.dk>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Synchronisation problems in COPY IN
Date: Mon, 13 Sep 2010 10:17:14 -0400 (EDT)
Message-ID: <alpine.BSO.2.00.1009131012001.25995@leary.csoft.net> (raw)
In-Reply-To: <4C8E1564.80405@alleroedderne.adsl.dk>
References: <4C8E1564.80405@alleroedderne.adsl.dk>



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



view thread (6+ messages)  latest in thread

Message-ID: <alpine.BSO.2.00.1009131012001.25995@leary.csoft.net>
Permalink:  ../alpine.BSO.2.00.1009131012001.25995@leary.csoft.net/
Also on:    postgresql.org/message-id/alpine.BSO.2.00.1009131012001.25995@leary.csoft.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: books@ejurka.com, kim+pg@alleroedderne.adsl.dk
  Subject: Re: Synchronisation problems in COPY IN
  In-Reply-To: <alpine.BSO.2.00.1009131012001.25995@leary.csoft.net>
  References: <4C8E1564.80405@alleroedderne.adsl.dk> <alpine.BSO.2.00.1009131012001.25995@leary.csoft.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox