pgsql: Update parallel executor support to reuse the same DSM. - Mailing list pgsql-committers

From Robert Haas
Subject pgsql: Update parallel executor support to reuse the same DSM.
Date
Msg-id E1Zs6JG-0002uz-Cb@gemulon.postgresql.org
Whole thread Raw
List 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(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Fix typo in bgworker.c
Next
From: Robert Haas
Date:
Subject: pgsql: doc: security_barrier option is a Boolean, not a string.