Async gang recreation should PQconnectPoll on bad fd poll.
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.

xinzweb/gpdb,cjcjameson/gpdb,adam8157/gpdb,50wu/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,kaknikhil/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,yuanzhao/gpdb,greenplum-db/gpdb,yuanzhao/gpdb,rvs/gpdb,greenplum-db/gpdb,Quikling/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,rvs/gpdb,rvs/gpdb,kaknikhil/gpdb,cjcjameson/gpdb,janebeckman/gpdb,yuanzhao/gpdb,xinzweb/gpdb,Chibin/gpdb,cjcjameson/gpdb,lisakowen/gpdb,yuanzhao/gpdb,jmcatamney/gpdb,rvs/gpdb,Chibin/gpdb,50wu/gpdb,Chibin/gpdb,xinzweb/gpdb,kaknikhil/gpdb,rvs/gpdb,kaknikhil/gpdb,Chibin/gpdb,lisakowen/gpdb,edespino/gpdb,rvs/gpdb,edespino/gpdb,ashwinstar/gpdb,yuanzhao/gpdb,Chibin/gpdb,edespino/gpdb,edespino/gpdb,50wu/gpdb,Quikling/gpdb,Quikling/gpdb,ashwinstar/gpdb,adam8157/gpdb,ashwinstar/gpdb,edespino/gpdb,adam8157/gpdb,adam8157/gpdb,kaknikhil/gpdb,janebeckman/gpdb,Quikling/gpdb,xinzweb/gpdb,xinzweb/gpdb,cjcjameson/gpdb,Quikling/gpdb,50wu/gpdb,adam8157/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,lisakowen/gpdb,Chibin/gpdb,rvs/gpdb,yuanzhao/gpdb,jmcatamney/gpdb,cjcjameson/gpdb,kaknikhil/gpdb,edespino/gpdb,Quikling/gpdb,cjcjameson/gpdb,yuanzhao/gpdb,xinzweb/gpdb,greenplum-db/gpdb,yuanzhao/gpdb,cjcjameson/gpdb,Quikling/gpdb,xinzweb/gpdb,Chibin/gpdb,Chibin/gpdb,jmcatamney/gpdb,janebeckman/gpdb,50wu/gpdb,Quikling/gpdb,Quikling/gpdb,janebeckman/gpdb,Chibin/gpdb,edespino/gpdb,lisakowen/gpdb,rvs/gpdb,lisakowen/gpdb,cjcjameson/gpdb,janebeckman/gpdb,xinzweb/gpdb,adam8157/gpdb,cjcjameson/gpdb,jmcatamney/gpdb,janebeckman/gpdb,kaknikhil/gpdb,rvs/gpdb,rvs/gpdb,kaknikhil/gpdb,50wu/gpdb,cjcjameson/gpdb,edespino/gpdb,edespino/gpdb,greenplum-db/gpdb,Quikling/gpdb,janebeckman/gpdb,janebeckman/gpdb,adam8157/gpdb,50wu/gpdb,kaknikhil/gpdb,Chibin/gpdb,adam8157/gpdb,greenplum-db/gpdb,janebeckman/gpdb,jmcatamney/gpdb,yuanzhao/gpdb,janebeckman/gpdb,edespino/gpdb,lisakowen/gpdb,lisakowen/gpdb,ashwinstar/gpdb,50wu/gpdb,lisakowen/gpdb,kaknikhil/gpdb,yuanzhao/gpdb,jmcatamney/gpdb