Before removing backup_label and irrevocably changing pg_control file, check that WAL file containing the checkpoint redo-location can be found. This avoids making the cluster irrecoverable if the redo location is in an earlie WAL file than the checkpoint record.
Before removing backup_label and irrevocably changing pg_control file, check
that WAL file containing the checkpoint redo-location can be found. This
avoids making the cluster irrecoverable if the redo location is in an earlie
WAL file than the checkpoint record.

Report, analysis and patch by Jeff Davis, with small changes by me.

cjcjameson/gpdb,kaknikhil/gpdb,lisakowen/gpdb,royc1/gpdb,Chibin/gpdb,CraigHarris/gpdb,kaknikhil/gpdb,edespino/gpdb,chrishajas/gpdb,xuegang/gpdb,janebeckman/gpdb,0x0FFF/gpdb,chrishajas/gpdb,lisakowen/gpdb,ahachete/gpdb,yuanzhao/gpdb,greenplum-db/gpdb,rvs/gpdb,lintzc/gpdb,cjcjameson/gpdb,0x0FFF/gpdb,janebeckman/gpdb,ahachete/gpdb,lisakowen/gpdb,yuanzhao/gpdb,yuanzhao/gpdb,kaknikhil/gpdb,xinzweb/gpdb,xuegang/gpdb,50wu/gpdb,CraigHarris/gpdb,Quikling/gpdb,edespino/gpdb,Chibin/gpdb,zaksoup/gpdb,edespino/gpdb,ahachete/gpdb,Chibin/gpdb,xinzweb/gpdb,greenplum-db/gpdb,janebeckman/gpdb,jmcatamney/gpdb,xuegang/gpdb,rvs/gpdb,adam8157/gpdb,chrishajas/gpdb,Quikling/gpdb,chrishajas/gpdb,rvs/gpdb,kaknikhil/gpdb,chrishajas/gpdb,adam8157/gpdb,lintzc/gpdb,royc1/gpdb,kaknikhil/gpdb,zaksoup/gpdb,royc1/gpdb,edespino/gpdb,CraigHarris/gpdb,xuegang/gpdb,jmcatamney/gpdb,royc1/gpdb,edespino/gpdb,cjcjameson/gpdb,ashwinstar/gpdb,lintzc/gpdb,Quikling/gpdb,janebeckman/gpdb,jmcatamney/gpdb,zaksoup/gpdb,royc1/gpdb,jmcatamney/gpdb,rvs/gpdb,adam8157/gpdb,janebeckman/gpdb,lintzc/gpdb,0x0FFF/gpdb,greenplum-db/gpdb,yuanzhao/gpdb,Quikling/gpdb,janebeckman/gpdb,cjcjameson/gpdb,adam8157/gpdb,edespino/gpdb,xinzweb/gpdb,CraigHarris/gpdb,CraigHarris/gpdb,royc1/gpdb,jmcatamney/gpdb,lintzc/gpdb,janebeckman/gpdb,yuanzhao/gpdb,xinzweb/gpdb,Quikling/gpdb,0x0FFF/gpdb,royc1/gpdb,adam8157/gpdb,cjcjameson/gpdb,cjcjameson/gpdb,yuanzhao/gpdb,jmcatamney/gpdb,xuegang/gpdb,yuanzhao/gpdb,lintzc/gpdb,yuanzhao/gpdb,lisakowen/gpdb,CraigHarris/gpdb,rvs/gpdb,Chibin/gpdb,Quikling/gpdb,0x0FFF/gpdb,chrishajas/gpdb,janebeckman/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,cjcjameson/gpdb,50wu/gpdb,edespino/gpdb,ahachete/gpdb,ahachete/gpdb,adam8157/gpdb,yuanzhao/gpdb,0x0FFF/gpdb,0x0FFF/gpdb,chrishajas/gpdb,kaknikhil/gpdb,kaknikhil/gpdb,ashwinstar/gpdb,CraigHarris/gpdb,50wu/gpdb,ahachete/gpdb,xinzweb/gpdb,50wu/gpdb,rvs/gpdb,CraigHarris/gpdb,50wu/gpdb,lintzc/gpdb,yuanzhao/gpdb,greenplum-db/gpdb,cjcjameson/gpdb,zaksoup/gpdb,Chibin/gpdb,Chibin/gpdb,ashwinstar/gpdb,kaknikhil/gpdb,greenplum-db/gpdb,kaknikhil/gpdb,0x0FFF/gpdb,50wu/gpdb,jmcatamney/gpdb,xuegang/gpdb,Quikling/gpdb,Chibin/gpdb,50wu/gpdb,zaksoup/gpdb,royc1/gpdb,50wu/gpdb,xinzweb/gpdb,edespino/gpdb,cjcjameson/gpdb,rvs/gpdb,edespino/gpdb,janebeckman/gpdb,cjcjameson/gpdb,adam8157/gpdb,greenplum-db/gpdb,chrishajas/gpdb,xuegang/gpdb,kaknikhil/gpdb,xinzweb/gpdb,ahachete/gpdb,edespino/gpdb,lisakowen/gpdb,Chibin/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,lintzc/gpdb,lisakowen/gpdb,ashwinstar/gpdb,xuegang/gpdb,jmcatamney/gpdb,lintzc/gpdb,xinzweb/gpdb,zaksoup/gpdb,Chibin/gpdb,ahachete/gpdb,adam8157/gpdb,Quikling/gpdb,rvs/gpdb,greenplum-db/gpdb,rvs/gpdb,Chibin/gpdb,zaksoup/gpdb,CraigHarris/gpdb,xuegang/gpdb,janebeckman/gpdb,zaksoup/gpdb,Quikling/gpdb,greenplum-db/gpdb,lisakowen/gpdb,Quikling/gpdb,rvs/gpdb,lisakowen/gpdb