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

Re: Trouble with COPY IN

From: Maciek Sakrejda <msakrejda(at)truviso(dot)com>
To: Matthew Wakeling <matthew(at)flymine(dot)org>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Trouble with COPY IN
Date: 2010-07-16 17:32:01
Message-ID: AANLkTim0dNU58e_Zg3OGTlylkYVAA9rtyhnb-xfzyLTl@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-jdbc
Could it be that COPY is erroring out, and then the driver tries to
end it anyway, causing the error? Anything interesting in the
PostgreSQL logs? Is it consistently reproducible with a specific data
set?
---
Maciek Sakrejda | System Architect | Truviso

1065 E. Hillsdale Blvd., Suite 230
Foster City, CA 94404
(650) 242-3500 Main
(650) 242-3501 F
www.truviso.com



On Fri, Jul 16, 2010 at 9:56 AM, Matthew Wakeling <matthew(at)flymine(dot)org> wrote:
>
> 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(FlushJobPostgresCopyImpl.java:56)
>  at org.intermine.sql.writebatch.Batch$BatchFlusher.run(Batch.java:456)
>  at java.lang.Thread.run(Thread.java:619)
> Caused by: org.postgresql.util.PSQLException: Tried to end inactive copy
>  at
> org.postgresql.core.v3.QueryExecutorImpl.endCopy(QueryExecutorImpl.java:803)
>  at org.postgresql.core.v3.CopyInImpl.endCopy(CopyInImpl.java:61)
>  at org.postgresql.copy.CopyManager.copyIn(CopyManager.java:181)
>  at org.postgresql.copy.CopyManager.copyIn(CopyManager.java:161)
>  at
> org.intermine.sql.writebatch.FlushJobPostgresCopyImpl.flush(FlushJobPostgresCopyImpl.java:51)
>
> 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.
>
> Matthew
>
> --
> First law of computing:  Anything can go wro
> sig: Segmentation fault.  core dumped.
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>

In response to

Responses

pgsql-hackers by date

Next:From: Kris JurkaDate: 2010-07-16 17:41:13
Subject: Re: Trouble with COPY IN
Previous:From: Kevin GrittnerDate: 2010-07-16 17:31:19
Subject: Re: SHOW TABLES

pgsql-jdbc by date

Next:From: Kris JurkaDate: 2010-07-16 17:41:13
Subject: Re: Trouble with COPY IN
Previous:From: Matthew WakelingDate: 2010-07-16 16:56:52
Subject: Trouble with COPY IN

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