ExecEndAppend() neglected to close indices on appended result rels, and improperly prevented the main result rel from being closed if it wasn't one of the Append's own result rels.  Per report from Hiroshi.
ExecEndAppend() neglected to close indices on appended result rels,
and improperly prevented the main result rel from being closed if it
wasn't one of the Append's own result rels.  Per report from Hiroshi.

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