Skip site navigation (1) Skip section navigation (2)

Trouble with COPY IN

From: Matthew Wakeling <matthew(at)flymine(dot)org>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Trouble with COPY IN
Date: 2010-07-16 16:56:52
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-jdbc
I'm having some trouble with a COPY IN BINARY statement. I have the 
following stack trace:

Caused by: java.sql.SQLException: Error writing to database, running 
statement COPY InterMineObject (OBJECT, class, tableclass, longObjType, 
fullTime, dateObjType, floatType, longType, booleanType, booleanObjType, 
title, bigDecimalObjType, stringObjType, doubleObjType, intObjType, name, 
id, doubleType, shortObjType, rangeStart, intermine_end, seniority, 
floatObjType, intType, shortType, vatNumber, debt, salary, rangeEnd, 
address, age, addressId, bankId, companyId, departmentId, 
businessAddressId, managerId, personalAddressId, parentId, 
departmentThatRejectedMeId, CEOId) FROM STDIN BINARY
   at org.intermine.sql.writebatch.FlushJobPostgresCopyImpl.flush(
   at org.intermine.sql.writebatch.Batch$
Caused by: org.postgresql.util.PSQLException: Tried to end inactive copy
   at org.postgresql.core.v3.QueryExecutorImpl.endCopy(
   at org.postgresql.core.v3.CopyInImpl.endCopy(
   at org.postgresql.copy.CopyManager.copyIn(
   at org.postgresql.copy.CopyManager.copyIn(
   at org.intermine.sql.writebatch.FlushJobPostgresCopyImpl.flush(

I have had a brief look at the JDBC driver code, and as far as I can see, 
this shouldn't ever happen. All I did was call CopyManager.copyIn(). It 
should have kept the correct locks to complete the operation.

For some reason, this seems to exhibit with some data but not with others.

Any clues would be very welcome.


 First law of computing:  Anything can go wro
 sig: Segmentation fault.  core dumped.


pgsql-hackers by date

Next:From: Hitoshi HaradaDate: 2010-07-16 17:03:03
Subject: Re: reducing NUMERIC size for 9.1
Previous:From: Robert HaasDate: 2010-07-16 16:56:33
Subject: Re: SHOW TABLES

pgsql-jdbc by date

Next:From: Maciek SakrejdaDate: 2010-07-16 17:32:01
Subject: Re: Trouble with COPY IN
Previous:From: Florence CousinDate: 2010-07-13 19:09:20
Subject: documentation on PGResultSetMetaData

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group