Guard against malloc failure.  Also, don't examine segP->lastBackend until we hold the spinlock.
Guard against malloc failure.  Also, don't examine segP->lastBackend
until we hold the spinlock.

edespino/gpdb,foyzur/gpdb,randomtask1155/gpdb,foyzur/gpdb,lisakowen/gpdb,oberstet/postgres-xl,tpostgres-projects/tPostgres,randomtask1155/gpdb,lintzc/gpdb,lisakowen/gpdb,ahachete/gpdb,kaknikhil/gpdb,kaknikhil/gpdb,atris/gpdb,Chibin/gpdb,xuegang/gpdb,ahachete/gpdb,Quikling/gpdb,lintzc/gpdb,lintzc/gpdb,yazun/postgres-xl,janebeckman/gpdb,lpetrov-pivotal/gpdb,kaknikhil/gpdb,janebeckman/gpdb,Postgres-XL/Postgres-XL,ahachete/gpdb,edespino/gpdb,yazun/postgres-xl,lintzc/gpdb,xuegang/gpdb,ahachete/gpdb,Quikling/gpdb,yazun/postgres-xl,Chibin/gpdb,zaksoup/gpdb,rvs/gpdb,royc1/gpdb,greenplum-db/gpdb,CraigHarris/gpdb,edespino/gpdb,lpetrov-pivotal/gpdb,postmind-net/postgres-xl,CraigHarris/gpdb,edespino/gpdb,atris/gpdb,50wu/gpdb,ashwinstar/gpdb,0x0FFF/gpdb,Postgres-XL/Postgres-XL,greenplum-db/gpdb,tpostgres-projects/tPostgres,atris/gpdb,adam8157/gpdb,xinzweb/gpdb,Quikling/gpdb,edespino/gpdb,oberstet/postgres-xl,rvs/gpdb,lpetrov-pivotal/gpdb,adam8157/gpdb,lpetrov-pivotal/gpdb,lintzc/gpdb,snaga/postgres-xl,kmjungersen/PostgresXL,yazun/postgres-xl,rvs/gpdb,kmjungersen/PostgresXL,rubikloud/gpdb,postmind-net/postgres-xl,lisakowen/gpdb,lintzc/gpdb,edespino/gpdb,zeroae/postgres-xl,xinzweb/gpdb,ahachete/gpdb,ashwinstar/gpdb,pavanvd/postgres-xl,ahachete/gpdb,postmind-net/postgres-xl,tangp3/gpdb,tangp3/gpdb,ashwinstar/gpdb,yazun/postgres-xl,techdragon/Postgres-XL,ashwinstar/gpdb,adam8157/gpdb,50wu/gpdb,rubikloud/gpdb,greenplum-db/gpdb,Postgres-XL/Postgres-XL,rubikloud/gpdb,lisakowen/gpdb,arcivanov/postgres-xl,lisakowen/gpdb,ahachete/gpdb,ovr/postgres-xl,chrishajas/gpdb,zeroae/postgres-xl,edespino/gpdb,atris/gpdb,cjcjameson/gpdb,cjcjameson/gpdb,xuegang/gpdb,edespino/gpdb,pavanvd/postgres-xl,snaga/postgres-xl,rubikloud/gpdb,yuanzhao/gpdb,lisakowen/gpdb,randomtask1155/gpdb,0x0FFF/gpdb,royc1/gpdb,oberstet/postgres-xl,jmcatamney/gpdb,CraigHarris/gpdb,cjcjameson/gpdb,lpetrov-pivotal/gpdb,0x0FFF/gpdb,Postgres-XL/Postgres-XL,Chibin/gpdb,Chibin/gpdb,50wu/gpdb,arcivanov/postgres-xl,xinzweb/gpdb,kaknikhil/gpdb,Chibin/gpdb,cjcjameson/gpdb,jmcatamney/gpdb,lintzc/gpdb,postmind-net/postgres-xl,yuanzhao/gpdb,cjcjameson/gpdb,xinzweb/gpdb,randomtask1155/gpdb,xinzweb/gpdb,jmcatamney/gpdb,Quikling/gpdb,adam8157/gpdb,atris/gpdb,50wu/gpdb,janebeckman/gpdb,techdragon/Postgres-XL,Quikling/gpdb,kaknikhil/gpdb,0x0FFF/gpdb,snaga/postgres-xl,greenplum-db/gpdb,tpostgres-projects/tPostgres,lpetrov-pivotal/gpdb,arcivanov/postgres-xl,arcivanov/postgres-xl,lisakowen/gpdb,pavanvd/postgres-xl,royc1/gpdb,xuegang/gpdb,rubikloud/gpdb,oberstet/postgres-xl,yuanzhao/gpdb,atris/gpdb,chrishajas/gpdb,Chibin/gpdb,kaknikhil/gpdb,tangp3/gpdb,randomtask1155/gpdb,adam8157/gpdb,jmcatamney/gpdb,tangp3/gpdb,50wu/gpdb,pavanvd/postgres-xl,ovr/postgres-xl,tangp3/gpdb,atris/gpdb,rubikloud/gpdb,rvs/gpdb,greenplum-db/gpdb,ovr/postgres-xl,Quikling/gpdb,oberstet/postgres-xl,techdragon/Postgres-XL,snaga/postgres-xl,Chibin/gpdb,pavanvd/postgres-xl,yuanzhao/gpdb,randomtask1155/gpdb,zaksoup/gpdb,randomtask1155/gpdb,jmcatamney/gpdb,tpostgres-projects/tPostgres,janebeckman/gpdb,CraigHarris/gpdb,yuanzhao/gpdb,zaksoup/gpdb,ovr/postgres-xl,tangp3/gpdb,jmcatamney/gpdb,cjcjameson/gpdb,adam8157/gpdb,lintzc/gpdb,Quikling/gpdb,rubikloud/gpdb,xuegang/gpdb,lisakowen/gpdb,zaksoup/gpdb,chrishajas/gpdb,rvs/gpdb,xuegang/gpdb,zaksoup/gpdb,xuegang/gpdb,50wu/gpdb,0x0FFF/gpdb,CraigHarris/gpdb,adam8157/gpdb,0x0FFF/gpdb,ovr/postgres-xl,foyzur/gpdb,techdragon/Postgres-XL,zeroae/postgres-xl,rvs/gpdb,rvs/gpdb,zaksoup/gpdb,tangp3/gpdb,atris/gpdb,greenplum-db/gpdb,Chibin/gpdb,lpetrov-pivotal/gpdb,jmcatamney/gpdb,chrishajas/gpdb,Quikling/gpdb,rubikloud/gpdb,cjcjameson/gpdb,kaknikhil/gpdb,Postgres-XL/Postgres-XL,chrishajas/gpdb,yuanzhao/gpdb,0x0FFF/gpdb,foyzur/gpdb,zeroae/postgres-xl,postmind-net/postgres-xl,royc1/gpdb,kmjungersen/PostgresXL,janebeckman/gpdb,janebeckman/gpdb,xinzweb/gpdb,xinzweb/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,Chibin/gpdb,edespino/gpdb,ashwinstar/gpdb,janebeckman/gpdb,kaknikhil/gpdb,janebeckman/gpdb,xuegang/gpdb,CraigHarris/gpdb,janebeckman/gpdb,kaknikhil/gpdb,foyzur/gpdb,Quikling/gpdb,ashwinstar/gpdb,techdragon/Postgres-XL,kmjungersen/PostgresXL,CraigHarris/gpdb,kaknikhil/gpdb,lpetrov-pivotal/gpdb,tangp3/gpdb,janebeckman/gpdb,kmjungersen/PostgresXL,cjcjameson/gpdb,royc1/gpdb,50wu/gpdb,chrishajas/gpdb,yuanzhao/gpdb,yuanzhao/gpdb,arcivanov/postgres-xl,ashwinstar/gpdb,foyzur/gpdb,0x0FFF/gpdb,yuanzhao/gpdb,rvs/gpdb,CraigHarris/gpdb,edespino/gpdb,Chibin/gpdb,royc1/gpdb,zeroae/postgres-xl,CraigHarris/gpdb,snaga/postgres-xl,royc1/gpdb,ahachete/gpdb,cjcjameson/gpdb,yuanzhao/gpdb,adam8157/gpdb,xinzweb/gpdb,randomtask1155/gpdb,royc1/gpdb,50wu/gpdb,greenplum-db/gpdb,chrishajas/gpdb,foyzur/gpdb,foyzur/gpdb,rvs/gpdb,zaksoup/gpdb,lintzc/gpdb,arcivanov/postgres-xl,tpostgres-projects/tPostgres,zaksoup/gpdb,Quikling/gpdb,rvs/gpdb,cjcjameson/gpdb,greenplum-db/gpdb,chrishajas/gpdb,xuegang/gpdb