Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e72910f

Browse filesBrowse files
committed
Fix handling of multi-column BRIN indexes
When evaluating clauses on multiple scan keys of a multi-column BRIN index, we can stop processing as soon as we find a scan key eliminating the range, and the range should not be added to tbe bitmap. That's how it worked before 14, but since a681e3c the code treated the range as matching if it matched at least the last scan key. Backpatch to 14, where this code was introduced. Backpatch-through: 14 Discussion: https://postgr.es/m/ebc18613-125e-60df-7520-fcbe0f9274fc%40enterprisedb.com
1 parent 393430f commit e72910f
Copy full SHA for e72910f

File tree

1 file changed

+7
-0
lines changed
Filter options

1 file changed

+7
-0
lines changed

‎src/backend/access/brin/brin.c

Copy file name to clipboardExpand all lines: src/backend/access/brin/brin.c
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,13 @@ bringetbitmap(IndexScanDesc scan, TIDBitmap *tbm)
686686
break;
687687
}
688688
}
689+
690+
/*
691+
* If we found a scan key eliminating the range, no need to
692+
* check additional ones.
693+
*/
694+
if (!addrange)
695+
break;
689696
}
690697
}
691698
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.