query_tree_mutator should copy RangeTblEntry nodes even when it's not planning to modify them itself.  Otherwise we end up with shared RTE substructure, which breaks inheritance_planner because the rte->inh flag needs to be independent in each copied subquery.  Per bug report from Chris Piker.
query_tree_mutator should copy RangeTblEntry nodes even when it's not
planning to modify them itself.  Otherwise we end up with shared RTE
substructure, which breaks inheritance_planner because the rte->inh
flag needs to be independent in each copied subquery.  Per bug report
from Chris Piker.

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