@@ -154,15 +154,8 @@ BitmapHeapNext(BitmapHeapScanState *node)
154
154
node -> prefetch_request_pos = 0 ;
155
155
if (node -> prefetch_maximum > 0 )
156
156
{
157
- pstate -> prefetch_iterator =
158
- tbm_prepare_shared_iterate (tbm );
159
-
160
- /*
161
- * We don't need the mutex here as we haven't yet woke up
162
- * others.
163
- */
164
- pstate -> prefetch_pages = 0 ;
165
- pstate -> prefetch_target = -1 ;
157
+ node -> prefetch_pages = 0 ;
158
+ node -> prefetch_target = -1 ;
166
159
}
167
160
#endif
168
161
@@ -264,19 +257,8 @@ BitmapHeapNext(BitmapHeapScanState *node)
264
257
* Try to prefetch at least a few pages even before we get to the
265
258
* second page if we don't stop reading after the first tuple.
266
259
*/
267
- if (!pstate )
268
- {
269
- if (node -> prefetch_target < node -> prefetch_maximum )
270
- node -> prefetch_target ++ ;
271
- }
272
- else if (pstate -> prefetch_target < node -> prefetch_maximum )
273
- {
274
- /* take spinlock while updating shared state */
275
- SpinLockAcquire (& pstate -> mutex );
276
- if (pstate -> prefetch_target < node -> prefetch_maximum )
277
- pstate -> prefetch_target ++ ;
278
- SpinLockRelease (& pstate -> mutex );
279
- }
260
+ if (node -> prefetch_target < node -> prefetch_maximum )
261
+ node -> prefetch_target ++ ;
280
262
#endif /* USE_PREFETCH */
281
263
}
282
264
@@ -401,10 +383,6 @@ static inline void
401
383
BitmapAdjustPrefetchTarget (BitmapHeapScanState * node )
402
384
{
403
385
#ifdef USE_PREFETCH
404
- /* NEON: we are not using prefetch iterator for parallel plan so no need to adjust it */
405
- if (node -> pstate != NULL )
406
- return ;
407
-
408
386
if (node -> prefetch_target >= node -> prefetch_maximum )
409
387
/* don't increase any further */ ;
410
388
else if (node -> prefetch_target >= node -> prefetch_maximum / 2 )
0 commit comments