Re: LIBPQ on Windows and large Queries

Поиск
Список
Период
Сортировка
От Hiroshi Inoue
Тема Re: LIBPQ on Windows and large Queries
Дата
Msg-id 3B6130D2.22445BAC@tpf.co.jp
обсуждение исходный текст
Ответ на LIBPQ on Windows and large Queries  ("Steve Howe" <howe@carcass.dhs.org>)
Ответы Re: LIBPQ on Windows and large Queries  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> 
> "Steve Howe" <howe@carcass.dhs.org> writes:
> >         Is anybody trying to solve the 8191 bytes query limit from libpq
> > windows port ???
> 
> FWIW, if the problem is real (which I still misdoubt), 

Yes it's real.
Error handling seems the cause. When "Error: pqReadData() --
read() failed: errno=0 No error" occurs WSAGetLastError()
returns WSAEWOULDBLOCK. If EWOULDBLOCK exists and errno ==
EWOULDBLOCK, pqReadData() returns 0 or 1 not -1.
I added the code errno = WSAGetLastError(); and 
#define    EWOULDBLOCK WSAEWOULDBLOCK.
After that I encountered another error "pqFlush() --  
couldn't send data: errno=0". Then WSAGetLastError() also
returns WSAEWOULDBLOCK. After adding *errno = WSAGetLastError();*
the insertion was successful.

regards,
Hiroshi Inoue


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

Предыдущее
От: Joerg Hessdoerfer
Дата:
Сообщение: Re: LIBPQ on Windows and large Queries
Следующее
От: Hiroshi Inoue
Дата:
Сообщение: Re: Slow Performance in PostgreSQL