Choose segment randomly to server as singleton reader gang
Choose segment randomly to server as singleton reader gang

This is a typo issue that cause segment 0 was always assigned
as singleton reader. It existed for a long time with no
functional issue, but may result in performance issue somehow.

Beside, root->config->cdbpath_segments is tuneable by GUC
gp_segments_for_planner, so gp_singleton_segindex may point to
an invalid segment, we use real segment count instead to avoid
mismatch.

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