Add error checking to PageRepairFragmentation to ensure that it can never overwrite adjacent pages with copied data, even if page header and/or item pointers are already corrupt.  Change inspired by trouble report from Alvaro Herrera.
Add error checking to PageRepairFragmentation to ensure that it can
never overwrite adjacent pages with copied data, even if page header
and/or item pointers are already corrupt.  Change inspired by trouble
report from Alvaro Herrera.

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