- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit6e39ca6
committed
Improve fix for not entering parallel mode when holding interrupts.
Commitac04aa8 put the shutoff for this into the planner, which isnot ideal because it doesn't prevent us from re-using a previouslymade parallel plan. Revert the planner change and instead put theshutoff into InitializeParallelDSM, modeling it on the existing codethere for recovering from failure to allocate a DSM segment.However, that code path is mostly untested, and testing a bit hardershowed there's at least one bug: ExecHashJoinReInitializeDSM is notprepared for us to have skipped doing parallel DSM setup. I alsothought the Assert in ReinitializeParallelWorkers is prettyill-advised, and replaced it with a silent Min() operation.The existing test case added byac04aa8 serves fine to test thisversion of the fix, so no change needed there.Patch by me, but thanks to Noah Misch for the core idea that wecould shut off worker creation when !INTERRUPTS_CAN_BE_PROCESSED.Back-patch to v12, asac04aa8 was.Discussion:https://postgr.es/m/CAC-SaSzHUKT=vZJ8MPxYdC_URPfax+yoA1hKTcF4ROz_Q6z0_Q@mail.gmail.com1 parent9c47574 commit6e39ca6
File tree
3 files changed
+16
-8
lines changed- src/backend
- access/transam
- executor
- optimizer/plan
3 files changed
+16
-8
lines changedLines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
219 | 219 |
| |
220 | 220 |
| |
221 | 221 |
| |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
222 | 231 |
| |
223 | 232 |
| |
224 | 233 |
| |
|
Lines changed: 7 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1516 | 1516 |
| |
1517 | 1517 |
| |
1518 | 1518 |
| |
1519 |
| - | |
1520 |
| - | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
1521 | 1526 |
| |
1522 | 1527 |
| |
1523 | 1528 |
| |
|
Lines changed: 0 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
331 | 331 |
| |
332 | 332 |
| |
333 | 333 |
| |
334 |
| - | |
335 |
| - | |
336 |
| - | |
337 |
| - | |
338 |
| - | |
339 | 334 |
| |
340 | 335 |
| |
341 | 336 |
| |
| |||
346 | 341 |
| |
347 | 342 |
| |
348 | 343 |
| |
349 |
| - | |
350 | 344 |
| |
351 | 345 |
| |
352 | 346 |
| |
|
0 commit comments
Comments
(0)