Guard against core dump from uninitialized subplan. If the planner erroneously puts a non-parallel-safe SubPlan into a parallelized portion of the query tree, nodeSubplan.c will fail in the worker processes because it finds a null in es_subplanstates, which it's unable to cope with. It seems worth a test-and-elog to make that an error case rather than a core dump case.
This probably should have been included in commit 16ebab688, which was responsible for allowing nulls to appear in es_subplanstates to begin with. So, back-patch to v10 where that came in. Discussion: https://postgr.es/m/[email protected] Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/55416b26a98fcf354af88cdd27fc2e045453b68a Modified Files -------------- src/backend/executor/nodeSubplan.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
