pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix crashes on plans with multiple Gather (Merge) nodes.
Date: Mon, 18 Dec 2017 17:34:07 +0000
Message-ID: <E1eQzIl-0004wN-K7@gemulon.postgresql.org> (raw)

Fix crashes on plans with multiple Gather (Merge) nodes.

es_query_dsa turns out to be broken by design, because it supposes
that there is only one DSA for the whole query, whereas there is
actually one per Gather (Merge) node.  For now, work around that
problem by setting and clearing the pointer around the sections of
code that might need it.  It's probably a better idea to get rid of
es_query_dsa altogether in favor of having each node keep track
individually of which DSA is relevant, but that seems like more than
we would want to back-patch.

Thomas Munro, reviewed and tested by Andreas Seltenreich, Amit
Kapila, and by me.

Discussion: http://postgr.es/m/CAEepm=1U6as=brnVvMNixEV2tpi8NuyQoTmO8Qef0-VV+=7MDA@mail.gmail.com

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/b70ea4c75e5f94fd7757ea4a522aee6724885288

Modified Files
--------------
src/backend/executor/execParallel.c    | 14 ++++++++------
src/backend/executor/nodeGather.c      |  6 ++++++
src/backend/executor/nodeGatherMerge.c |  4 ++++
3 files changed, 18 insertions(+), 6 deletions(-)



view thread (2+ messages)

Message-ID: <E1eQzIl-0004wN-K7@gemulon.postgresql.org>
Permalink:  ../E1eQzIl-0004wN-K7@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1eQzIl-0004wN-K7@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: rhaas@postgresql.org
  Subject: Re: pgsql: Fix crashes on plans with multiple Gather (Merge) nodes.
  In-Reply-To: <E1eQzIl-0004wN-K7@gemulon.postgresql.org>
  References: <E1eQzIl-0004wN-K7@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