mirror of
https://github.com/postgres/postgres.git
synced 2025-08-25 20:23:07 +03:00
Update parallel executor support to reuse the same DSM.
Commit b0b0d84b3d
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.
This commit is contained in:
@@ -33,5 +33,6 @@ extern ParallelExecutorInfo *ExecInitParallelPlan(PlanState *planstate,
|
||||
EState *estate, int nworkers);
|
||||
extern void ExecParallelFinish(ParallelExecutorInfo *pei);
|
||||
extern void ExecParallelCleanup(ParallelExecutorInfo *pei);
|
||||
extern shm_mq_handle **ExecParallelReinitializeTupleQueues(ParallelContext *pcxt);
|
||||
|
||||
#endif /* EXECPARALLEL_H */
|
||||
|
Reference in New Issue
Block a user