Dear Fujii-san,
Thanks for pushing and analyzing the failure!
> The regression.diffs shows that pgfdw_conn_check returned 0 even though
> pgfdw_conn_checkable()
> returned true. This can happen if the "revents" from poll() indicates something
> other than
> POLLRDHUP. I think that "revents" could indicate POLLHUP, POLLERR, or
> POLLNVAL. Therefore,
> IMO pgfdw_conn_check() should be updated as follows. I will test this change.
>
> - return (input_fd.revents & POLLRDHUP) ? 1 : 0;
> + return (input_fd.revents &
> + (POLLRDHUP | POLLHUP | POLLERR |
> POLLNVAL)) ? 1 : 0;
I think you are right.
According to the man page, the input socket is invalid or disconnected if revents
has such bits. So such cases should be also regarded as *failure*.
After the fix, the animal said OK. Great works!
Best regards,
Hayato Kuroda
FUJITSU LIMITED