Fix possible crash with Parallel Bitmap Heap Scan.
authorRobert Haas <rhaas@postgresql.org>
Fri, 13 Oct 2017 18:53:28 +0000 (14:53 -0400)
committerRobert Haas <rhaas@postgresql.org>
Fri, 13 Oct 2017 19:05:14 +0000 (15:05 -0400)
commita3b1c221893f739950e9232b4b789750f247cee5
treed1344e6085c5c447cd3be46cf1dc615d72a355a4
parentd48bf6a94d295c3779c6af4df118d95a6606192f
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
src/backend/optimizer/plan/createplan.c