forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit354dfa2
committed
Make sure that hash join's bulk-tuple-transfer loops are interruptible.
The loops in ExecHashJoinNewBatch(), ExecHashIncreaseNumBatches(), andExecHashRemoveNextSkewBucket() are all capable of iterating over manytuples without ever doing a CHECK_FOR_INTERRUPTS, so that the backendmight fail to respond to SIGINT or SIGTERM for an unreasonably long time.Fix that. In the case of ExecHashJoinNewBatch(), it seems useful to putthe added CHECK_FOR_INTERRUPTS into ExecHashJoinGetSavedTuple() ratherthan directly in the loop, because that will also ensure that bothprincipal code paths through ExecHashJoinOuterGetTuple() will do aCHECK_FOR_INTERRUPTS, which seems like a good idea to avoid surprises.Back-patch to all supported branches.Tom Lane and Thomas MunroDiscussion:https://postgr.es/m/6044.1487121720@sss.pgh.pa.us1 parenta3f4c8e commit354dfa2
2 files changed
+13
-0
lines changedLines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
720 | 720 |
| |
721 | 721 |
| |
722 | 722 |
| |
| 723 | + | |
| 724 | + | |
| 725 | + | |
723 | 726 |
| |
724 | 727 |
| |
725 | 728 |
| |
| |||
1599 | 1602 |
| |
1600 | 1603 |
| |
1601 | 1604 |
| |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
1602 | 1608 |
| |
1603 | 1609 |
| |
1604 | 1610 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
911 | 911 |
| |
912 | 912 |
| |
913 | 913 |
| |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
914 | 921 |
| |
915 | 922 |
| |
916 | 923 |
| |
|
0 commit comments
Comments
(0)