forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1fdb0ce
committed
BitmapHeapScan: Use correct recheck flag for skip_fetch
As of7c70996, BitmapPrefetch() used the recheck flag forthe current block to determine whether or not it should skip prefetchingthe proposed prefetch block. As explained in the comment, this assumedthe index AM will report the same recheck value for the future page asit did for the current page - but there's no guarantee.This only affects prefetching - if the recheck flag changes, we mayprefetch blocks unecessarily and not prefetch blocks that will beneeded. But we don't need to rely on that assumption - we know therecheck flag for the block we're considering prefetching, so we canuse that.The impact is very limited in practice - the opclass would need toassign different recheck flags to different blocks, but none of thebuilt-in opclasses seems to do that.Author: Melanie PlagemanReviewed-by: Tomas Vondra, Andres Freund, Tom LaneDiscussion:https://postgr.es/m/1939305.1712415547%40sss.pgh.pa.us1 parent04e72ed commit1fdb0ce
1 file changed
+2
-7
lines changedLines changed: 2 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
475 | 475 |
| |
476 | 476 |
| |
477 | 477 |
| |
478 |
| - | |
479 |
| - | |
480 |
| - | |
481 |
| - | |
482 |
| - | |
483 | 478 |
| |
484 | 479 |
| |
485 |
| - | |
| 480 | + | |
486 | 481 |
| |
487 | 482 |
| |
488 | 483 |
| |
| |||
533 | 528 |
| |
534 | 529 |
| |
535 | 530 |
| |
536 |
| - | |
| 531 | + | |
537 | 532 |
| |
538 | 533 |
| |
539 | 534 |
| |
|
0 commit comments
Comments
(0)