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

Commit 1b89056

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 49df45a commit 1b89056

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
@@ -1292,8 +1292,11 @@ brinsummarize(Relation index, Relation heapRel, BlockNumber pageRange,
12921292
if (pageRange == BRIN_ALL_BLOCKRANGES)
12931293
startBlk = 0;
12941294
else
1295+
{
12951296
startBlk = (pageRange / pagesPerRange) * pagesPerRange;
1296-
if (startBlk >= heapNumBlocks)
1297+
heapNumBlocks = Min(heapNumBlocks, startBlk + pagesPerRange);
1298+
}
1299+
if (startBlk > heapNumBlocks)
12971300
{
12981301
/* Nothing to do if start point is beyond end of table */
12991302
brinRevmapTerminate(revmap);

0 commit comments

Comments
 (0)