Avoid generating bogus paths with partitionwise aggregate.

Robert Haas <rhaas@postgresql.org>

Commit: c6f28af5d7af87d7370e5f169251d91437f100a2
Author: Robert Haas <rhaas@postgresql.org>
Date: 2018-06-22T13:20:19Z
Releases: 11.0
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

Files

Discussion