Fix mistaken failure to allow parallelism in corner case.
Robert Haas <rhaas@postgresql.org>
Fix mistaken failure to allow parallelism in corner case. If we try to run a parallel plan in serial mode because, for example, it's going to be scanned via a cursor, but for some reason we're already in parallel mode (for example because an outer query is running in parallel), we'd incorrectly try to launch workers. Fix by adding a flag to the EState, so that we can be certain that ExecutePlan() and ExecGather()/ExecGatherMerge() will have the same idea about whether we are executing serially or in parallel. Report and fix by Amit Kapila with help from Kuntal Ghosh. A few tweaks by me. Discussion: http://postgr.es/m/CAA4eK1+_BuZrmVCeua5Eqnm4Co9DAXdM5HPAOE2J19ePbR912Q@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/executor/execMain.c | modified | +1 −0 |
| src/backend/executor/execUtils.c | modified | +2 −0 |
| src/backend/executor/nodeGather.c | modified | +1 −1 |
| src/backend/executor/nodeGatherMerge.c | modified | +1 −1 |
| src/include/nodes/execnodes.h | modified | +2 −0 |
Discussion
- Parallel safety for extern params 14 messages · 2017-10-13 → 2025-03-24