Re: Add client connection check during the execution of the query - Mailing list pgsql-hackers

From Zhihong Yu
Subject Re: Add client connection check during the execution of the query
Date
Msg-id CALNJ-vQbNVH=-kEr+wB94LYinCZf3XNcOTc+vkm=sF9YD5G8zg@mail.gmail.com
Whole thread Raw
In response to Re: Add client connection check during the execution of the query  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-hackers


On Thu, Oct 7, 2021 at 8:43 PM Thomas Munro <thomas.munro@gmail.com> wrote:
On Sat, Jun 12, 2021 at 8:31 PM Zhihong Yu <zyu@yugabyte.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)?
Hi,
My former comment was about 4 months old.

The current way as expressed in the patch should be fine.

Cheers

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [BUG] Unexpected action when publishing partition tables
Next
From: Noah Misch
Date:
Subject: Re: pgsql: Adjust configure to insist on Perl version >= 5.8.3.