Remove unnecessary opening of other relation in RI_FKey_keyequal_upd_pk and RI_FKey_keyequal_upd_fk, as well as no-longer-needed calls of ri_BuildQueryKeyFull.  Aside from saving a few cycles, this avoids needless deadlock risks when an update is not changing the columns that participate in an RI constraint.  Per a gripe from Alexey Nalbat.
Remove unnecessary opening of other relation in RI_FKey_keyequal_upd_pk
and RI_FKey_keyequal_upd_fk, as well as no-longer-needed calls of
ri_BuildQueryKeyFull.  Aside from saving a few cycles, this avoids needless
deadlock risks when an update is not changing the columns that participate
in an RI constraint.  Per a gripe from Alexey Nalbat.

Back-patch to 8.3.  Earlier releases did have a need to open the other
relation due to the way in which they retrieved information about the RI
constraint, so this problem unfortunately can't easily be improved pre-8.3.

Tom Lane and Stephan Szabo

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