forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit480bc6e
committed
Remove unneeded nbtree array preprocessing assert.
Certain cases involving the use of cursors had assertion failures within_bt_preprocess_keys's recently added no-op return path. The assertionin question made the faulty assumption that a second or third call to_bt_preprocess_keys (within the same btrescan) could only happen whenanother scheduled primitive index scan was just about to begin.It would be possible to address the problem by only allowing scans thathave array keys to take the new no-op path, forcing affected cases toperform redundant preprocessing work. It seems simpler to just removethe assertion, and reframe the no-op path as a more general mechanism.Take this simpler approach.The important underlying principle is that we only need to performpreprocessing once per btrescan (at most). This is expected regardlessof whether or not the scan happens to have array keys.Oversight in commit1b134ca, which enhanced nbtree ScalarArrayOpexecution.Reported-By: Alexander Lakhin <exclusion@gmail.com>Discussion:https://postgr.es/m/ef0f7c8b-a6fa-362e-6fd6-054950f947ca@gmail.com1 parent7e44ac3 commit480bc6e
1 file changed
+6
-9
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2572 | 2572 |
| |
2573 | 2573 |
| |
2574 | 2574 |
| |
2575 |
| - | |
2576 |
| - | |
2577 |
| - | |
2578 |
| - | |
2579 |
| - | |
2580 | 2575 |
| |
2581 | 2576 |
| |
2582 | 2577 |
| |
2583 |
| - | |
2584 |
| - | |
2585 |
| - | |
| 2578 | + | |
| 2579 | + | |
| 2580 | + | |
| 2581 | + | |
| 2582 | + | |
| 2583 | + | |
2586 | 2584 |
| |
2587 |
| - | |
2588 | 2585 |
| |
2589 | 2586 |
| |
2590 | 2587 |
| |
|
0 commit comments
Comments
(0)