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.
This commit is contained in:
Alvaro Herrera 2017-11-03 20:36:32 +01:00
parent 5159626afb
commit b17870d754

View File

@ -1290,8 +1290,11 @@ brinsummarize(Relation index, Relation heapRel, BlockNumber pageRange,
if (pageRange == BRIN_ALL_BLOCKRANGES)
startBlk = 0;
else
{
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 */
brinRevmapTerminate(revmap);