Async gang recreation should PQconnectPoll on bad fd poll.
There are segment recovery scenarios where revent would be POLLNVAL and event as POLLOUT. This would cause an infinite loop until the default 10 minute timeout is reached. Because of this, the FTS portion at the bottom of the createGang_async() function does not get correctly executed. This patch adds checking the fd poll revent for POLLERR, POLLHUP, and POLLNVAL to call a PQconnectPoll so that polling status PGRES_POLLING_WRITING can correctly update to PGRES_POLLING_FAILED. It will then be able to exit the loop and execute the FTS stuff.
Showing
想要评论请 注册 或 登录