]> granicus.if.org Git - postgresql/commit
Avoid generating bogus paths with partitionwise aggregate.
authorRobert Haas <rhaas@postgresql.org>
Fri, 22 Jun 2018 13:14:34 +0000 (09:14 -0400)
committerRobert Haas <rhaas@postgresql.org>
Fri, 22 Jun 2018 13:20:19 +0000 (09:20 -0400)
commitc6f28af5d7af87d7370e5f169251d91437f100a2
tree0c991de08a7e78137705c6eda3d1461ebe742626
parent2448adf29c543befbac59f1ecfbb3ef4b0d808ce
Avoid generating bogus paths with partitionwise aggregate.

Previously, if some or all partitions had no partially aggregated path,
we would still try to generate a partially aggregated path for the
parent, leading to assertion failures or wrong answers.

Report by Rajkumar Raghuwanshi.  Patch by Jeevan Chalke, reviewed
by Ashutosh Bapat.  A few changes by me.

Discussion: http://postgr.es/m/CAKcux6=q4+Mw8gOOX16ef6ZMFp9Cve7KWFstUsrDa4GiFaXGUQ@mail.gmail.com
src/backend/optimizer/plan/planner.c
src/test/regress/expected/partition_aggregate.out
src/test/regress/sql/partition_aggregate.sql