Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru> writes:
> There is memory leak in RelationBuildRowSecurity function - it converts
> node to expression tree in current memory context:
Hm ... this smells a whole lot like the issue we fixed recently for
partition expressions, namely: what the devil are we doing reloading
these expressions during RelationClearRelation? We should delay
populating that cache until the value is requested.
regards, tom lane