"Simon Riggs" <simon@2ndquadrant.com> writes:
> Is it possible to allocate the subquery in a child context of the main
> query, so that it is technically a different context, yet can be freed
> simultaneously?
That's exactly what the code *was* doing, but the problem is that we'd
free the child context during ExecEndSubqueryScan, at which point the
tupdesc is still needed.
regards, tom lane