Modify local buffer management to request memory for local buffers in blocks of increasing size, instead of one at a time.  This reduces the memory management overhead when num_temp_buffers is large: in the previous coding we would actually waste 50% of the space used for temp buffers, because aset.c would round the individual requests up to 16K.  Problem noted while studying a performance issue reported by Steven Flatt.
Modify local buffer management to request memory for local buffers in blocks
of increasing size, instead of one at a time.  This reduces the memory
management overhead when num_temp_buffers is large: in the previous coding
we would actually waste 50% of the space used for temp buffers, because aset.c
would round the individual requests up to 16K.  Problem noted while studying
a performance issue reported by Steven Flatt.

Back-patch as far as 8.1 --- older versions used few enough local buffers
that the issue isn't significant for them.

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