Fix the postmaster reset failure on master node
Fix the postmaster reset failure on master node

If a QD crashes for reasons such as SIGSEGV, SIGKILL or PANIC,
postmaster reset fails sometimes. The root cause is: postmaster
would first tell child processes to exit, and then wait for the
termination of important processes such as AutoVacuum, BgWriter,
CheckPoint etc, before it resets share memory and restarts auxiliary
processes; however, WAL writer process is missed in the waiting list,
so it can happen that postmaster spawns StartupProcess and then notices
the exit of WAL writer, so it tells StartupProcess to exit; then
postmaster would notice the abnormal exit of StartupProcess in turn,
and treats it as recovery failure, then call exit() itself. Thus, we end
up with no postmaster process on master node at all.

This happens almost everytime when master host machine has poor performance.

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