pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Guard against core dump from uninitialized subplan.
Date: Tue, 03 Nov 2020 21:16:51 +0000
Message-ID: <E1ka3ff-00066c-6y@gemulon.postgresql.org> (raw)

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

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9d878d7fee789d79afb846e401e56a65dd23a0f4

Modified Files
--------------
src/backend/executor/nodeSubplan.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)



view thread (5+ messages)  latest in thread

Message-ID: <E1ka3ff-00066c-6y@gemulon.postgresql.org>
Permalink:  ../E1ka3ff-00066c-6y@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ka3ff-00066c-6y@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Guard against core dump from uninitialized subplan.
  In-Reply-To: <E1ka3ff-00066c-6y@gemulon.postgresql.org>
  References: <E1ka3ff-00066c-6y@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox