Fix bogus lock release in RemovePolicyById and RemoveRoleFromObjectPolicy.
Fix bogus lock release in RemovePolicyById and RemoveRoleFromObjectPolicy.

Can't release the AccessExclusiveLock on the target table until commit.
Otherwise there is a race condition whereby other backends might service
our cache invalidation signals before they can actually see the updated
catalog rows.

Just to add insult to injury, RemovePolicyById was closing the rel (with
incorrect lock drop) and then passing the now-dangling rel pointer to
CacheInvalidateRelcache.  Probably the reason this doesn't fall over on
CLOBBER_CACHE buildfarm members is that some outer level of the DROP logic
is still holding the rel open ... but it'd have bit us on the arse
eventually, no doubt.

50wu/gpdb,adam8157/gpdb,greenplum-db/gpdb,50wu/gpdb,lisakowen/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,lisakowen/gpdb,50wu/gpdb,xinzweb/gpdb,xinzweb/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,50wu/gpdb,ashwinstar/gpdb,xinzweb/gpdb,ashwinstar/gpdb,adam8157/gpdb,xinzweb/gpdb,adam8157/gpdb,adam8157/gpdb,ashwinstar/gpdb,xinzweb/gpdb,lisakowen/gpdb,lisakowen/gpdb,lisakowen/gpdb,lisakowen/gpdb,adam8157/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,xinzweb/gpdb,greenplum-db/gpdb,50wu/gpdb,xinzweb/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,50wu/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,lisakowen/gpdb,jmcatamney/gpdb,adam8157/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,lisakowen/gpdb,ashwinstar/gpdb,50wu/gpdb,xinzweb/gpdb,adam8157/gpdb,adam8157/gpdb,50wu/gpdb,jmcatamney/gpdb,greenplum-db/gpdb