Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit92641d8

Browse files
committed
Change BitmapAdjustPrefetchIterator to accept BlockNumber
BitmapAdjustPrefetchIterator() only used the blockno member of thepassed in TBMIterateResult to ensure that the prefetch iterator andregular iterator stay in sync. Pass it the BlockNumber only, so that wecan move away from using the TBMIterateResult outside of table AMspecific code.Author: Melanie PlagemanReviewed-by: Tomas Vondra, Andres Freund, Heikki LinnakangasDiscussion:https://postgr.es/m/CAAKRu_ZwCwWFeL_H3ia26bP2e7HiKLWt0ZmGXPVwPO6uXq0vaA%40mail.gmail.com
1 parent1fdb0ce commit92641d8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎src/backend/executor/nodeBitmapHeapscan.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
staticTupleTableSlot*BitmapHeapNext(BitmapHeapScanState*node);
5353
staticinlinevoidBitmapDoneInitializingSharedState(ParallelBitmapHeapState*pstate);
5454
staticinlinevoidBitmapAdjustPrefetchIterator(BitmapHeapScanState*node,
55-
TBMIterateResult*tbmres);
55+
BlockNumberblockno);
5656
staticinlinevoidBitmapAdjustPrefetchTarget(BitmapHeapScanState*node);
5757
staticinlinevoidBitmapPrefetch(BitmapHeapScanState*node,
5858
TableScanDescscan);
@@ -231,7 +231,7 @@ BitmapHeapNext(BitmapHeapScanState *node)
231231
break;
232232
}
233233

234-
BitmapAdjustPrefetchIterator(node,tbmres);
234+
BitmapAdjustPrefetchIterator(node,tbmres->blockno);
235235

236236
valid_block=table_scan_bitmap_next_block(scan,tbmres);
237237

@@ -342,7 +342,7 @@ BitmapDoneInitializingSharedState(ParallelBitmapHeapState *pstate)
342342
*/
343343
staticinlinevoid
344344
BitmapAdjustPrefetchIterator(BitmapHeapScanState*node,
345-
TBMIterateResult*tbmres)
345+
BlockNumberblockno)
346346
{
347347
#ifdefUSE_PREFETCH
348348
ParallelBitmapHeapState*pstate=node->pstate;
@@ -361,7 +361,7 @@ BitmapAdjustPrefetchIterator(BitmapHeapScanState *node,
361361
/* Do not let the prefetch iterator get behind the main one */
362362
TBMIterateResult*tbmpre=tbm_iterate(prefetch_iterator);
363363

364-
if (tbmpre==NULL||tbmpre->blockno!=tbmres->blockno)
364+
if (tbmpre==NULL||tbmpre->blockno!=blockno)
365365
elog(ERROR,"prefetch and main iterators are out of sync");
366366
}
367367
return;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp