Force pg_database updates out to disk immediately after ALTER DATABASE; this is to avoid scenarios where incoming backends find no live copies of a database's row because the only live copy is in an as-yet-unwritten shared buffer, which they can't see.  Also, use FlushRelationBuffers() for forcing out pg_database, instead of the much more expensive BufferSync(). There's no need to write out pages belonging to other relations.
Force pg_database updates out to disk immediately after ALTER DATABASE;
this is to avoid scenarios where incoming backends find no live copies
of a database's row because the only live copy is in an as-yet-unwritten
shared buffer, which they can't see.  Also, use FlushRelationBuffers()
for forcing out pg_database, instead of the much more expensive BufferSync().
There's no need to write out pages belonging to other relations.

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