Re: Add client connection check during the execution of the query

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Zhihong Yu <zyu(at)yugabyte(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-10-08 03:43:19
Message-ID: CA+hUKGL8rmZ5eJ8hrf6La8K0H8jXgReL=hH9OXDpY368sAqOMQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jun 12, 2021 at 8:31 PM Zhihong Yu <zyu(at)yugabyte(dot)com> wrote:
> +#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))

Hi Zhihong,

Why? Isn't (A & B) | (A & C) is the same as A & (B | C)?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2021-10-08 03:47:14 Re: [BUG] Unexpected action when publishing partition tables
Previous Message Tom Lane 2021-10-08 03:39:11 Re: pgsql: Adjust configure to insist on Perl version >= 5.8.3.