On Mon, Jan 06, 2020 at 01:21:35AM -0500, Tom Lane wrote:
> Yeah, if somebody wanted to fix this, the right way is to replace
> these malloc calls with pallocs. Some investigation would be needed
> about which context to use.
It seems to me that this would be TopMemoryContext. All the plans
used for the checks are kept within the context of the session.
--
Michael