Re: BUG #18096: In edge-triggered epoll and kqueue, PQconsumeInput/PQisBusy are insufficient for correct async ops.
От | Tom Lane |
---|---|
Тема | Re: BUG #18096: In edge-triggered epoll and kqueue, PQconsumeInput/PQisBusy are insufficient for correct async ops. |
Дата | |
Msg-id | 1876131.1694183591@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | BUG #18096: In edge-triggered epoll and kqueue, PQconsumeInput/PQisBusy are insufficient for correct async ops. (PG Bug reporting form <noreply@postgresql.org>) |
Ответы |
Re: BUG #18096: In edge-triggered epoll and kqueue, PQconsumeInput/PQisBusy are insufficient for correct async ops.
|
Список | pgsql-bugs |
PG Bug reporting form <noreply@postgresql.org> writes: > When processing asynchronous commands, I call the `PQconsumeInput` and > `PQisBusy` functions to check if data has arrived, as shown below, but this > does not work correctly in edge trigger mode for epoll and kqueue. You have not really provided any evidence of a bug. The contract for PQconsumeInput is that it will consume *some* input if any is available, not that it will consume *all* available input. (I don't think there is much reason to try to change that. In the first place, there might not be enough buffer space, and in the second place, even if it did consume all input, more might arrive immediately after it looks.) Without a self-contained test case, it's hard to be sure what is going wrong for you; but my guess is that this is a bug in the way you are checking for more available input rather than something libpq did wrong. > However, the `pqReadData()` function will not call the `pqsecure_read()` > function until the `errno` is set to `EAGAIN` or `EWOULDBLOCK`, Uh ... what? regards, tom lane
В списке pgsql-bugs по дате отправления: