Question about non-blocking mode in libpq

Поиск
Список
Период
Сортировка
Искать
От
Yugo NAGATA
Тема
Question about non-blocking mode in libpq
Дата
Msg-id
20210713115949.702986955f8ccf23fa81073c@sraoss.co.jp
Список
Дерево обсуждения
Question about non-blocking mode in libpq Yugo NAGATA <nagata@sraoss.co.jp>
Re: Question about non-blocking mode in libpq Yugo NAGATA <nagata@sraoss.co.jp>
Re: Question about non-blocking mode in libpq Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Question about non-blocking mode in libpq Yugo NAGATA <nagata@sraoss.co.jp>
Re: Question about non-blocking mode in libpq Bruce Momjian <bruce@momjian.us>
Re: Question about non-blocking mode in libpq Tom Lane <tgl@sss.pgh.pa.us>
Re: Question about non-blocking mode in libpq Bruce Momjian <bruce@momjian.us>
Re: Question about non-blocking mode in libpq Tom Lane <tgl@sss.pgh.pa.us>
Re: Question about non-blocking mode in libpq Bruce Momjian <bruce@momjian.us>
Re: Question about non-blocking mode in libpq Tom Lane <tgl@sss.pgh.pa.us>
Re: Question about non-blocking mode in libpq Bruce Momjian <bruce@momjian.us>
Re: Question about non-blocking mode in libpq Bruce Momjian <bruce@momjian.us>
Re: Question about non-blocking mode in libpq Bruce Momjian <bruce@momjian.us>
Hello,

During reading the documentation of libpq [1] , I found the following
description:

 In the nonblocking state, calls to PQsendQuery, PQputline, PQputnbytes,
 PQputCopyData, and PQendcopy will not block but instead return an error
 if they need to be called again.

[1] https://www.postgresql.org/docs/devel/libpq-async.html

However, looking into the code, PQsendQuery seems not to return an error
in non-bloking mode even if unable to send all data. In such cases,
pqSendSome will return 1 but it doesn't cause an error. Moreover,
we would not need to call PQsendQuery again. Indead, we need to call
PQflush until it returns 0, as documented with regard to PQflush.

Do we need to fix the description of PQsetnonblocking?

Regards,
Yugo Nagata

-- 
Yugo NAGATA 


В списке pgsql-hackers по дате отправления
От: Jeff Davis
Дата:
От: David Rowley
Дата:
FAQ