Phil Sorber <phil(at)omniti(dot)com> writes:
> That helped a lot. I now have a simple test case that I can reliably
> re-produce the segfault and now also a patch that fixes it.
[ pokes at that... ] Hmm. I think what this proves is that that
optimization in EvalPlanQualStart is just too cute for its own good,
and that the only safe fix is to take it out. That code path is
(obviously) none too well tested, so we should not have it setting
up execution tree structures that are not like those used normally.
It's just begging for trouble.
regards, tom lane