Set partitioned_rels appropriately when UNION ALL is used.
authorRobert Haas <rhaas@postgresql.org>
Thu, 14 Sep 2017 14:43:44 +0000 (10:43 -0400)
committerRobert Haas <rhaas@postgresql.org>
Thu, 14 Sep 2017 15:00:39 +0000 (11:00 -0400)
commit1555566d9ee1a996a28cc4601840a67831112695
tree8dcb68833c25a1a71cd730c1ee761ca85ebd3a35
parent1ab973ab600dc4295dbbd38d1643f9bd26f81d8e
Set partitioned_rels appropriately when UNION ALL is used.

In most cases, this omission won't matter, because the appropriate
locks will have been acquired during parse/plan or by AcquireExecutorLocks.
But it's a bug all the same.

Report by Ashutosh Bapat.  Patch by me, reviewed by Amit Langote.

Discussion: http://postgr.es/m/CAFjFpRdHb_ZnoDTuBXqrudWXh3H1ibLkr6nHsCFT96fSK4DXtA@mail.gmail.com
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/plan/planner.c