Re: Trouble with COPY IN

Поиск
Список
Период
Сортировка
От Matthew Wakeling
Тема Re: Trouble with COPY IN
Дата
Msg-id alpine.DEB.2.00.1007201507500.8895@aragorn.flymine.org
обсуждение исходный текст
Ответ на Re: Trouble with COPY IN  (Matthew Wakeling <matthew@flymine.org>)
Ответы Re: Trouble with COPY IN
Re: Trouble with COPY IN
Список pgsql-jdbc
On Tue, 20 Jul 2010, Matthew Wakeling wrote:
> After a little more investigation, it appears that
> core.v3.QueryExecutorImpl.unlock() is being called before
> core.v3.QueryExecutorImpl.endCopy(), in
> core.v3.QueryExecutorImpl.processCopyResults() apparently because it receives
> a "Z", called by core.v3.QueryExecutorImpl.writeToCopy(). Investigating
> further.

Okay, have investigated a little further. It seems that the server may be
responding to the client a little too quickly with the "all done" message.
Here is a sequence of events in core.v3.QueryExecutorImpl:


We call startCopy(). It calls processCopyResults().
In processCopyResults, we receive character G, and we lock.

We call writeToCopy(). It calls processCopyResults().
We receive character C.
We receive character Z, and unlock.

We call endCopy(), which tries to unlock and fails.


So, should the unlocking happen elsewhere, or should endCopy not require a
lock?

Matthew

--
 Jadzia: Don't forget the 34th rule of acquisition: Peace is good for business.
 Quark:  That's the 35th.
 Jadzia: Oh yes, that's right. What's the 34th again?
 Quark:  War is good for business. It's easy to get them mixed up.

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Matthew Wakeling
Дата:
Сообщение: Re: Trouble with COPY IN
Следующее
От: Matthew Wakeling
Дата:
Сообщение: Re: Trouble with COPY IN