]> granicus.if.org Git - postgresql/commit
Update parallel executor support to reuse the same DSM.
authorRobert Haas <rhaas@postgresql.org>
Fri, 30 Oct 2015 09:43:00 +0000 (10:43 +0100)
committerRobert Haas <rhaas@postgresql.org>
Fri, 30 Oct 2015 09:44:54 +0000 (10:44 +0100)
commit3a1f8611f2582df0a16bcd35caed2e1526387643
treea246c057e24fd1a8870194a1d1ff3bf3e15ebb58
parentc6baec92fc48387da8164d50f5699a7162267718
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.
src/backend/access/transam/README.parallel
src/backend/access/transam/parallel.c
src/backend/executor/execParallel.c
src/backend/executor/nodeGather.c
src/include/access/parallel.h
src/include/executor/execParallel.h