Re: BUG #4527: Prepare of large multirow insert fails without error

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #4527: Prepare of large multirow insert fails without error
Дата
Msg-id 20112.1226590127@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #4527: Prepare of large multirow insert fails without error  ("Vincent Kessler" <vincent.kessler@quantec-networks.de>)
Ответы Re: BUG #4527: Prepare of large multirow insert fails without error  (Vincent Kessler <vincent.kessler@quantec-networks.de>)
Список pgsql-bugs
"Vincent Kessler" <vincent.kessler@quantec-networks.de> writes:
> i am trying to do large multirow inserts using PQsendPrepare. I have not
> found a limit in the number of parameters or the size of the querystring, so
> i assume memory is the limit.
> When executing the PQsendPrepare function using a querystring of about 100kb
> in size and about 10000 parameters the function returns after timeout. A
> tcpdump shows a "parse" message with a length of 100kb but the transfer
> stops after roughly 30kb.

With such a large statement it's unlikely that the PQsendPrepare call
would have been able to push all the data out immediately.  Since it's
intended to not block the application, it would return with some data
still unsent.  You need to call PQflush periodically until the data is
all transmitted, if you want to run in nonblocking mode.

> The server log shows:
> LOG:  incomplete message from client
> LOG:  unexpected EOF on client connection

Although this explanation doesn't say why the client apparently dropped
the connection.  I think you need to show us a complete example of what
you're doing, if the above hint isn't sufficient.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #4528: (rounding?) error with some timezone names
Следующее
От: Vincent Kessler
Дата:
Сообщение: Re: BUG #4527: Prepare of large multirow insert fails without error