Ensure locks are acquired on RLS-added relations
authorStephen Frost
Fri, 28 Aug 2015 15:39:43 +0000 (11:39 -0400)
committerStephen Frost
Fri, 28 Aug 2015 15:39:43 +0000 (11:39 -0400)
commitd03f3314b35cc4ac2be832cf63ae67a69ee4d93c
treedc850bb50107a3271aadc0bcef25e0529c9ef104
parentaed688eb730f0e46bc7950589d7577db6bb2d724
Ensure locks are acquired on RLS-added relations

During fireRIRrules(), get_row_security_policies can add to
securityQuals and withCheckOptions.  Make sure to lock any relations
added at that point and before firing RIR rules on those expressions.

Back-patch to 9.5 where RLS was added.
src/backend/rewrite/rewriteHandler.c