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

Re: [HACKERS] Trouble with COPY IN

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Matthew Wakeling <matthew(at)flymine(dot)org>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Maciek Sakrejda <msakrejda(at)truviso(dot)com>, Samuel Gendler <sgendler(at)ideasculptor(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [HACKERS] Trouble with COPY IN
Date: 2010-07-23 00:55:13
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-jdbc
On Thu, Jul 22, 2010 at 5:34 PM, Kris Jurka <books(at)ejurka(dot)com> wrote:
> Per discussion and investigation on the -jdbc list, the server appears to
> violate the frontend/backend protocol when binary copy data is sent to the
> server.  Upon receiving the binary copy end of data marker (a -1 field
> count), the server immediately responds with CommandComplete and
> ReadyForQuery without waiting for the frontend to issue CopyDone or
> CopyFail.  This confuses the JDBC driver as it doesn't think the command
> sequence should have finished yet.
> Attached is a patch to make the server continue to consume protocol data
> until instructed to stop by the client in the same way as copying text data
> to the server currently works.
> Kris Jurka

I guess the obvious question is whether we shouldn't instead change
the docs to match the behavior.  I suspect there's almost no chance
we'd consider back-patching a change of this type, since it is a clear
behavior change.  And even if we did, there would still be people
running servers with the old behavior with which JDBC and other
drivers would have to cope.  Having two different behaviors might be
worse than the status quo.

Robert Haas
The Enterprise Postgres Company

In response to


pgsql-hackers by date

Next:From: KaiGai KoheiDate: 2010-07-23 00:58:11
Subject: Re: security label support, part.2
Previous:From: Robert HaasDate: 2010-07-23 00:31:41
Subject: Re: review: psql: edit function, show function commands patch

pgsql-jdbc by date

Next:From: Matthew WakelingDate: 2010-07-23 09:33:27
Subject: Re: Trouble with COPY IN
Previous:From: Kris JurkaDate: 2010-07-22 21:34:08
Subject: Re: Trouble with COPY IN

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