Re: Synchronisation problems in COPY IN - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Synchronisation problems in COPY IN
Date
Msg-id alpine.BSO.2.00.1009131012001.25995@leary.csoft.net
Whole thread Raw
In response to Synchronisation problems in COPY IN  (Kim Bisgaard <kim+pg@alleroedderne.adsl.dk>)
Responses Re: Synchronisation problems in COPY IN  (Samuel Gendler <sgendler@ideasculptor.com>)
Re: Synchronisation problems in COPY IN  (Maciek Sakrejda <msakrejda@truviso.com>)
List pgsql-jdbc

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

pgsql-jdbc by date:

Previous
From: Kim Bisgaard
Date:
Subject: Synchronisation problems in COPY IN
Next
From: Samuel Gendler
Date:
Subject: Re: Synchronisation problems in COPY IN