> I haven't looked into the code yet, but when I ran below commands during > make installcheck, there was an error and an assertion failure
Thanks for the report. I actually made a nasty mistake in the last patch after code refactoring, which is to not properly check that a QueryDesc is already being tracked. So every subquery call in the same query is allocating DSAs and those segments are not being properly cleared. So the patch is broken and probably explains your crashes. Just made a 1 line fix and make installcheck looks clean now. Will do more tests before sending another version.