forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit41e2b84
committed
Fix bogus handling of JOIN_UNIQUE_OUTER/INNER cases for parallel joins.
consider_parallel_nestloop passed the wrong jointype down to itssubroutines for JOIN_UNIQUE_INNER cases (it should pass JOIN_INNER), and itthought that it could pass paths other than innerrel->cheapest_total_pathto create_unique_path, which create_unique_path is not on board with.These bugs would lead to assertion failures or other errors, suggestingthat this code path hasn't been tested much.hash_inner_and_outer's code for parallel join effectively treated bothJOIN_UNIQUE_OUTER and JOIN_UNIQUE_INNER the same as JOIN_INNER (fordifferent reasons :-(), leading to incorrect plans that treated a semijoinas if it were a plain join.Michael Day submitted a test case demonstrating that hash_inner_and_outerfailed for JOIN_UNIQUE_OUTER, and I found the other cases through codereview.Report:https://postgr.es/m/D0E8A029-D1AC-42E8-979A-5DE4A77E4413@rcmail.com1 parentca5f885 commit41e2b84
1 file changed
+20
-13
lines changedLines changed: 20 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1217 | 1217 |
| |
1218 | 1218 |
| |
1219 | 1219 |
| |
| 1220 | + | |
1220 | 1221 |
| |
1221 | 1222 |
| |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
1222 | 1226 |
| |
1223 | 1227 |
| |
1224 | 1228 |
| |
| |||
1244 | 1248 |
| |
1245 | 1249 |
| |
1246 | 1250 |
| |
1247 |
| - | |
1248 |
| - | |
1249 |
| - | |
1250 |
| - | |
1251 |
| - | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
1252 | 1256 |
| |
1253 |
| - | |
| 1257 | + | |
1254 | 1258 |
| |
1255 |
| - | |
| 1259 | + | |
1256 | 1260 |
| |
1257 | 1261 |
| |
1258 |
| - | |
| 1262 | + | |
| 1263 | + | |
1259 | 1264 |
| |
1260 | 1265 |
| |
1261 | 1266 |
| |
| |||
1284 | 1289 |
| |
1285 | 1290 |
| |
1286 | 1291 |
| |
| 1292 | + | |
1287 | 1293 |
| |
1288 | 1294 |
| |
1289 | 1295 |
| |
| |||
1450 | 1456 |
| |
1451 | 1457 |
| |
1452 | 1458 |
| |
1453 |
| - | |
1454 |
| - | |
1455 |
| - | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
1456 | 1462 |
| |
1457 | 1463 |
| |
1458 | 1464 |
| |
| |||
1466 | 1472 |
| |
1467 | 1473 |
| |
1468 | 1474 |
| |
1469 |
| - | |
| 1475 | + | |
| 1476 | + | |
1470 | 1477 |
| |
1471 | 1478 |
| |
1472 | 1479 |
| |
1473 |
| - | |
| 1480 | + | |
1474 | 1481 |
| |
1475 | 1482 |
| |
1476 | 1483 |
| |
|
0 commit comments
Comments
(0)