forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitde380a6
committed
Make table_scan_bitmap_next_block() async-friendly
Move all responsibility for indicating a block is exhuasted intotable_scan_bitmap_next_tuple() and advance the main iterator inheap-specific code. This flow control makes more sense and is a steptoward using the read stream API for bitmap heap scans.Previously, table_scan_bitmap_next_block() returned false to indicatetable_scan_bitmap_next_tuple() should not be called for the tuples onthe page. This happened both when 1) there were no visible tuples on thepage and 2) when the block returned by the iterator was past the end ofthe table. BitmapHeapNext() (generic bitmap table scan code) handled thecase when the bitmap was exhausted.It makes more sense for table_scan_bitmap_next_tuple() to return falsewhen there are no visible tuples on the page andtable_scan_bitmap_next_block() to return false when the bitmap isexhausted or there are no more blocks in the table.As part of this new design, TBMIterateResults are no longer used as aflow control mechanism in BitmapHeapNext(), so we removedtable_scan_bitmap_next_tuple's TBMIterateResult parameter.Note that the prefetch iterator is still saved in theBitmapHeapScanState node and advanced in generic bitmap table scan code.This is because 1) it was not necessary to change the prefetch iteratorlocation to change the flow control in BitmapHeapNext() 2) modifyingprefetch iterator management requires several more steps better splitover multiple commits and 3) the prefetch iterator will be removed oncethe read stream API is used.Author: Melanie PlagemanReviewed-by: Tomas Vondra, Andres Freund, Heikki Linnakangas, Mark DilgerDiscussion:https://postgr.es/m/063e4eb4-32d9-439e-a0b1-75565a9835a8%40iki.fi1 parent7bd7aa4 commitde380a6
File tree
6 files changed
+252
-162
lines changed- src
- backend
- access/heap
- executor
- include
- access
- nodes
6 files changed
+252
-162
lines changedLines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1387 | 1387 |
| |
1388 | 1388 |
| |
1389 | 1389 |
| |
1390 |
| - | |
1391 |
| - | |
| 1390 | + | |
| 1391 | + | |
1392 | 1392 |
| |
1393 | 1393 |
| |
1394 | 1394 |
| |
1395 | 1395 |
| |
1396 | 1396 |
| |
1397 | 1397 |
| |
1398 | 1398 |
| |
1399 |
| - | |
1400 |
| - | |
| 1399 | + | |
| 1400 | + | |
1401 | 1401 |
| |
1402 | 1402 |
| |
1403 | 1403 |
| |
|
Lines changed: 42 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2115 | 2115 |
| |
2116 | 2116 |
| |
2117 | 2117 |
| |
2118 |
| - | |
| 2118 | + | |
2119 | 2119 |
| |
2120 | 2120 |
| |
2121 | 2121 |
| |
2122 |
| - | |
| 2122 | + | |
2123 | 2123 |
| |
2124 | 2124 |
| |
2125 | 2125 |
| |
| 2126 | + | |
2126 | 2127 |
| |
2127 | 2128 |
| |
2128 | 2129 |
| |
2129 | 2130 |
| |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
| 2147 | + | |
| 2148 | + | |
| 2149 | + | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
2130 | 2161 |
| |
2131 | 2162 |
| |
2132 | 2163 |
| |
| |||
2145 | 2176 |
| |
2146 | 2177 |
| |
2147 | 2178 |
| |
2148 |
| - | |
2149 |
| - | |
2150 |
| - | |
2151 |
| - | |
2152 |
| - | |
2153 |
| - | |
2154 |
| - | |
2155 |
| - | |
2156 |
| - | |
2157 |
| - | |
| 2179 | + | |
2158 | 2180 |
| |
2159 | 2181 |
| |
2160 | 2182 |
| |
| |||
2249 | 2271 |
| |
2250 | 2272 |
| |
2251 | 2273 |
| |
2252 |
| - | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
2253 | 2282 |
| |
2254 | 2283 |
| |
2255 | 2284 |
| |
2256 | 2285 |
| |
2257 |
| - | |
2258 | 2286 |
| |
2259 | 2287 |
| |
2260 | 2288 |
| |
|
0 commit comments
Comments
(0)