mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	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
This commit is contained in:
		@@ -4933,7 +4933,11 @@ bitmap_subplan_mark_shared(Plan *plan)
 | 
				
			|||||||
		bitmap_subplan_mark_shared(
 | 
							bitmap_subplan_mark_shared(
 | 
				
			||||||
								   linitial(((BitmapAnd *) plan)->bitmapplans));
 | 
													   linitial(((BitmapAnd *) plan)->bitmapplans));
 | 
				
			||||||
	else if (IsA(plan, BitmapOr))
 | 
						else if (IsA(plan, BitmapOr))
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
		((BitmapOr *) plan)->isshared = true;
 | 
							((BitmapOr *) plan)->isshared = true;
 | 
				
			||||||
 | 
							bitmap_subplan_mark_shared(
 | 
				
			||||||
 | 
													   linitial(((BitmapOr *) plan)->bitmapplans));
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	else if (IsA(plan, BitmapIndexScan))
 | 
						else if (IsA(plan, BitmapIndexScan))
 | 
				
			||||||
		((BitmapIndexScan *) plan)->isshared = true;
 | 
							((BitmapIndexScan *) plan)->isshared = true;
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user