Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b17870d

Browse files
committed
Fix thinkos in BRIN summarization
The previous commit contained a thinko that made a single-range summarization request process from there to end of table. Fix by setting the correct end range point. Per buildfarm.
1 parent 5159626 commit b17870d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/backend/access/brin/brin.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1290,8 +1290,11 @@ brinsummarize(Relation index, Relation heapRel, BlockNumber pageRange,
12901290
if (pageRange == BRIN_ALL_BLOCKRANGES)
12911291
startBlk = 0;
12921292
else
1293+
{
12931294
startBlk = (pageRange / pagesPerRange) * pagesPerRange;
1294-
if (startBlk >= heapNumBlocks)
1295+
heapNumBlocks = Min(heapNumBlocks, startBlk + pagesPerRange);
1296+
}
1297+
if (startBlk > heapNumBlocks)
12951298
{
12961299
/* Nothing to do if start point is beyond end of table */
12971300
brinRevmapTerminate(revmap);

0 commit comments

Comments
 (0)