Content-Length: 264974 | pFad | http://github.com/postgrespro/postgres_cluster/commit/1b890562b8d1b44bd3ef948aeeb58dd59abd04b7

60 Fix thinkos in BRIN summarization · postgrespro/postgres_cluster@1b89056 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/1b890562b8d1b44bd3ef948aeeb58dd59abd04b7

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy