From: | Zhihong Yu <zyu(at)yugabyte(dot)com> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
Cc: | "tsunakawa(dot)takay(at)fujitsu(dot)com" <tsunakawa(dot)takay(at)fujitsu(dot)com>, Maksim Milyutin <milyutinma(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de> |
Subject: | Re: Add client connection check during the execution of the query |
Date: | 2021-06-12 08:35:59 |
Message-ID: | CALNJ-vQxA038t3j+kr3-rSVGWE5FbnSPQVVmTgLrhLWSyXxNcg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jun 11, 2021 at 9:24 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> On Fri, Apr 30, 2021 at 2:23 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)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,
- Assert(count > 0);
+ /* 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)))
It seems the last condition above should be written as:
((cur_pollfd->revents & POLLRDHUP) | (cur_pollfd->revents & errflags))
Cheers
From | Date | Subject | |
---|---|---|---|
Next Message | Fabien COELHO | 2021-06-12 09:41:24 | Re: psql - add SHOW_ALL_RESULTS option |
Previous Message | Julien Rouhaud | 2021-06-12 08:29:12 | Re: Hook for extensible parsing. |