Avoid generating bogus paths with partitionwise aggregate.
Robert Haas <rhaas@postgresql.org>
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
| Path | Change | +/− |
|---|---|---|
| src/backend/optimizer/plan/planner.c | modified | +13 −8 |
| src/test/regress/expected/partition_aggregate.out | modified | +105 −0 |
| src/test/regress/sql/partition_aggregate.sql | modified | +24 −0 |
Discussion
- Server crashed with TRAP: FailedAssertion("!(parallel_workers > 0)" when partitionwise_aggregate true. 12 messages · 2018-06-18 → 2018-06-27