Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a3b1c22

Browse files
committed
Fix possible crash with Parallel Bitmap Heap Scan.
If a Parallel Bitmap Heap scan's chain of leftmost descendents includes a BitmapOr whose first child is a BitmapAnd, the prior coding would mistakenly create a non-shared TIDBitmap and then try to perform shared iteration. Report by Tomas Vondra. Patch by Dilip Kumar. Discussion: http://postgr.es/m/50e89684-8ad9-dead-8767-c9545bafd3b6@2ndquadrant.com
1 parent d48bf6a commit a3b1c22

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/backend/optimizer/plan/createplan.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4926,7 +4926,11 @@ bitmap_subplan_mark_shared(Plan *plan)
49264926
bitmap_subplan_mark_shared(
49274927
linitial(((BitmapAnd *) plan)->bitmapplans));
49284928
else if (IsA(plan, BitmapOr))
4929+
{
49294930
((BitmapOr *) plan)->isshared = true;
4931+
bitmap_subplan_mark_shared(
4932+
linitial(((BitmapOr *) plan)->bitmapplans));
4933+
}
49304934
else if (IsA(plan, BitmapIndexScan))
49314935
((BitmapIndexScan *) plan)->isshared = true;
49324936
else

0 commit comments

Comments
 (0)