mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
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:
@ -1292,8 +1292,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);
|
||||||
|
Reference in New Issue
Block a user