pgsql: Update parallel executor support to reuse the same DSM.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Update parallel executor support to reuse the same DSM.
Date: 2015-10-30 09:49:22
Message-ID: E1Zs6JG-0002uz-Cb@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Update parallel executor support to reuse the same DSM.

Commit b0b0d84b3d663a148022e900ebfc164284a95f55 purported to make it
possible to relaunch workers using the same parallel context, but it had
an unpleasant race condition: we might reinitialize after the workers
have sent their last control message but before they have dettached the
DSM, leaving to crashes. Repair by introducing a new ParallelContext
operation, ReinitializeParallelDSM.

Adjust execParallel.c to use this new support, so that we can rescan a
Gather node by relaunching workers but without needing to recreate the
DSM.

Amit Kapila, with some adjustments by me. Extracted from latest parallel
sequential scan patch.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/3a1f8611f2582df0a16bcd35caed2e1526387643

Modified Files
--------------
src/backend/access/transam/README.parallel | 10 +-
src/backend/access/transam/parallel.c | 175 +++++++++++++++-------------
src/backend/executor/execParallel.c | 33 ++++--
src/backend/executor/nodeGather.c | 54 ++++++---
src/include/access/parallel.h | 1 +
src/include/executor/execParallel.h | 1 +
6 files changed, 166 insertions(+), 108 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2015-10-30 11:26:33 pgsql: doc: security_barrier option is a Boolean, not a string.
Previous Message Robert Haas 2015-10-30 09:40:32 pgsql: Fix typo in bgworker.c