Determine max_connections first, then see how large shared_buffers can be made, to avoid corner cases where max_connections ends up unreasonably small because shared_buffers is hogging too much shmem space.  Per pghackers discussion about a week ago.  Also, fix the copy-newlines problem in a more robust way, by using COPY FROM filename instead of COPY FROM STDIN; per a suggestion from Peter.
Determine max_connections first, then see how large shared_buffers can
be made, to avoid corner cases where max_connections ends up unreasonably
small because shared_buffers is hogging too much shmem space.  Per pghackers
discussion about a week ago.  Also, fix the copy-newlines problem in a
more robust way, by using COPY FROM filename instead of COPY FROM STDIN;
per a suggestion from Peter.

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