Skip to content
Snippets Groups Projects
Commit b17870d7 authored by Alvaro Herrera's avatar Alvaro Herrera
Browse files

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.
parent 5159626a
No related branches found
No related tags found
No related merge requests found
...@@ -1290,8 +1290,11 @@ brinsummarize(Relation index, Relation heapRel, BlockNumber pageRange, ...@@ -1290,8 +1290,11 @@ brinsummarize(Relation index, Relation heapRel, BlockNumber pageRange,
if (pageRange == BRIN_ALL_BLOCKRANGES) if (pageRange == BRIN_ALL_BLOCKRANGES)
startBlk = 0; startBlk = 0;
else else
{
startBlk = (pageRange / pagesPerRange) * pagesPerRange; startBlk = (pageRange / pagesPerRange) * pagesPerRange;
if (startBlk >= heapNumBlocks) heapNumBlocks = Min(heapNumBlocks, startBlk + pagesPerRange);
}
if (startBlk > heapNumBlocks)
{ {
/* Nothing to do if start point is beyond end of table */ /* Nothing to do if start point is beyond end of table */
brinRevmapTerminate(revmap); brinRevmapTerminate(revmap);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment