]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Guard against core dump from uninitialized subplan.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 3 Nov 2020 21:16:36 +0000 (16:16 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 3 Nov 2020 21:16:36 +0000 (16:16 -0500)
commit936043c9eacb9e9c7356a8190a410d2c4e4ea03a
treec3fe1393ac13173ed0caeb4129c4d5df348e22f9
parent768dbef0d49826c2e404ceb1567b3cc9e2bbc30a
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/924226.1604422326@sss.pgh.pa.us
src/backend/executor/nodeSubplan.c