Re: Add client connection check during the execution of the query
От | Zhihong Yu |
---|---|
Тема | Re: Add client connection check during the execution of the query |
Дата | |
Msg-id | CALNJ-vQxA038t3j+kr3-rSVGWE5FbnSPQVVmTgLrhLWSyXxNcg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Add client connection check during the execution of the query (Thomas Munro <thomas.munro@gmail.com>) |
Ответы |
Re: Add client connection check during the execution of the query
|
Список | pgsql-hackers |
On Fri, Jun 11, 2021 at 9:24 PM Thomas Munro <thomas.munro@gmail.com> wrote:
On Fri, Apr 30, 2021 at 2:23 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> Here's something I wanted to park here to look into for the next
> cycle: it turns out that kqueue's EV_EOF flag also has the right
> semantics for this. That leads to the idea of exposing the event via
> the WaitEventSet API, and would the bring
> client_connection_check_interval feature to 6/10 of our OSes, up from
> 2/10. Maybe Windows' FD_CLOSE event could get us up to 7/10, not
> sure.
Rebased. Added documentation tweak and a check to reject the GUC on
unsupported OSes.
Hi,
+ /* For WL_SOCKET_READ -> WL_SOCKET_CLOSED, no change needed. */
+ if (count == 0)
+ return;
+
Assert(count <= 2);
It seems that the remaining Assert() should say 1 <= count && count <= 2
+#ifdef POLLRDHUP
+ if ((cur_event->events & WL_SOCKET_CLOSED) &&
+ (cur_pollfd->revents & (POLLRDHUP | errflags)))
+ if ((cur_event->events & WL_SOCKET_CLOSED) &&
+ (cur_pollfd->revents & (POLLRDHUP | errflags)))
It seems the last condition above should be written as:
((cur_pollfd->revents & POLLRDHUP) | (cur_pollfd->revents & errflags))
Cheers
В списке pgsql-hackers по дате отправления: