Remove BTScanOpaqueData.firstPage
Alexander Korotkov <akorotkov@postgresql.org>
Remove BTScanOpaqueData.firstPage It's not necessary to keep the firstPage flag as a field of BTScanOpaqueData. This commit makes it an argument of the _bt_readpage() function. We can easily distinguish first-time and repeated calls (within the scan) of this function. Reported-by: Peter Geoghegan Discussion: https://postgr.es/m/CAH2-Wzk4SOsw%2BtHuTFiz8U9Jqj-R77rYPkhWKODCBb1mdHACXA%40mail.gmail.com Reviewed-by: Pavel Borisov
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/nbtree/nbtree.c | modified | +0 −1 |
| src/backend/access/nbtree/nbtsearch.c | modified | +8 −10 |
| src/include/access/nbtree.h | modified | +0 −3 |
Discussion
- Bug in nbtree optimization to skip > operator comparisons (or < comparisons in backwards scans) 31 messages · 2023-12-06 → 2024-03-22