In PrepareToInvalidateCacheTuple, don't force initialization of catalog caches that we don't actually need to touch.  This saves some trivial number of cycles and avoids certain cases of deadlock when doing concurrent VACUUM FULL on system catalogs.  Per report from Gavin Roy.
In PrepareToInvalidateCacheTuple, don't force initialization of catalog
caches that we don't actually need to touch.  This saves some trivial
number of cycles and avoids certain cases of deadlock when doing concurrent
VACUUM FULL on system catalogs.  Per report from Gavin Roy.

Backpatch to 8.2.  In earlier versions, CatalogCacheInitializeCache didn't
lock the relation so there's no deadlock risk (though that certainly had
plenty of risks of its own).

lintzc/gpdb,cjcjameson/gpdb,xuegang/gpdb,Quikling/gpdb,Quikling/gpdb,janebeckman/gpdb,edespino/gpdb,rvs/gpdb,lisakowen/gpdb,ahachete/gpdb,janebeckman/gpdb,xinzweb/gpdb,edespino/gpdb,Chibin/gpdb,CraigHarris/gpdb,Chibin/gpdb,CraigHarris/gpdb,cjcjameson/gpdb,lintzc/gpdb,zaksoup/gpdb,50wu/gpdb,Quikling/gpdb,xinzweb/gpdb,xuegang/gpdb,yuanzhao/gpdb,xinzweb/gpdb,jmcatamney/gpdb,zaksoup/gpdb,kaknikhil/gpdb,cjcjameson/gpdb,cjcjameson/gpdb,rvs/gpdb,ashwinstar/gpdb,Quikling/gpdb,ahachete/gpdb,jmcatamney/gpdb,ahachete/gpdb,50wu/gpdb,chrishajas/gpdb,janebeckman/gpdb,xinzweb/gpdb,adam8157/gpdb,xuegang/gpdb,chrishajas/gpdb,chrishajas/gpdb,xuegang/gpdb,Chibin/gpdb,kaknikhil/gpdb,CraigHarris/gpdb,greenplum-db/gpdb,lisakowen/gpdb,greenplum-db/gpdb,ahachete/gpdb,lintzc/gpdb,rvs/gpdb,kaknikhil/gpdb,jmcatamney/gpdb,xuegang/gpdb,kaknikhil/gpdb,yuanzhao/gpdb,zaksoup/gpdb,0x0FFF/gpdb,50wu/gpdb,50wu/gpdb,royc1/gpdb,0x0FFF/gpdb,jmcatamney/gpdb,lintzc/gpdb,chrishajas/gpdb,cjcjameson/gpdb,yuanzhao/gpdb,rvs/gpdb,janebeckman/gpdb,adam8157/gpdb,ahachete/gpdb,yuanzhao/gpdb,kaknikhil/gpdb,lintzc/gpdb,edespino/gpdb,Chibin/gpdb,Chibin/gpdb,rvs/gpdb,ahachete/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,kaknikhil/gpdb,0x0FFF/gpdb,yuanzhao/gpdb,royc1/gpdb,rvs/gpdb,Chibin/gpdb,rvs/gpdb,kaknikhil/gpdb,ashwinstar/gpdb,lintzc/gpdb,chrishajas/gpdb,adam8157/gpdb,CraigHarris/gpdb,Quikling/gpdb,lisakowen/gpdb,kaknikhil/gpdb,greenplum-db/gpdb,50wu/gpdb,edespino/gpdb,Quikling/gpdb,yuanzhao/gpdb,CraigHarris/gpdb,Quikling/gpdb,adam8157/gpdb,xinzweb/gpdb,50wu/gpdb,greenplum-db/gpdb,0x0FFF/gpdb,xinzweb/gpdb,yuanzhao/gpdb,lisakowen/gpdb,xuegang/gpdb,royc1/gpdb,chrishajas/gpdb,janebeckman/gpdb,adam8157/gpdb,lintzc/gpdb,jmcatamney/gpdb,CraigHarris/gpdb,Quikling/gpdb,zaksoup/gpdb,xinzweb/gpdb,zaksoup/gpdb,greenplum-db/gpdb,yuanzhao/gpdb,greenplum-db/gpdb,zaksoup/gpdb,chrishajas/gpdb,Quikling/gpdb,cjcjameson/gpdb,xuegang/gpdb,xuegang/gpdb,0x0FFF/gpdb,rvs/gpdb,janebeckman/gpdb,kaknikhil/gpdb,adam8157/gpdb,lisakowen/gpdb,zaksoup/gpdb,royc1/gpdb,rvs/gpdb,royc1/gpdb,50wu/gpdb,adam8157/gpdb,lisakowen/gpdb,ashwinstar/gpdb,lisakowen/gpdb,edespino/gpdb,CraigHarris/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,CraigHarris/gpdb,xinzweb/gpdb,ashwinstar/gpdb,rvs/gpdb,royc1/gpdb,cjcjameson/gpdb,xuegang/gpdb,Chibin/gpdb,50wu/gpdb,zaksoup/gpdb,janebeckman/gpdb,lintzc/gpdb,jmcatamney/gpdb,lintzc/gpdb,0x0FFF/gpdb,CraigHarris/gpdb,ahachete/gpdb,royc1/gpdb,janebeckman/gpdb,cjcjameson/gpdb,edespino/gpdb,edespino/gpdb,ashwinstar/gpdb,cjcjameson/gpdb,janebeckman/gpdb,greenplum-db/gpdb,Chibin/gpdb,yuanzhao/gpdb,edespino/gpdb,lisakowen/gpdb,cjcjameson/gpdb,edespino/gpdb,ashwinstar/gpdb,0x0FFF/gpdb,Quikling/gpdb,kaknikhil/gpdb,Chibin/gpdb,yuanzhao/gpdb,ahachete/gpdb,janebeckman/gpdb,Chibin/gpdb,edespino/gpdb,chrishajas/gpdb,0x0FFF/gpdb,adam8157/gpdb,royc1/gpdb,ashwinstar/gpdb