On Tue, Jan 9, 2018 at 5:41 AM, Amit Khandekar <amitdkhan...@gmail.com> wrote: > This subplan should not be there. It looks like that's because when > we add up subpaths while preparing Parallel Append path containing mix of > partial and non-partial child paths, in accumulate_append_subpath(), > the subpath being added is an Append path because it's a multi-level > partition. So in the condition "else if (special_subpaths != NULL)", > both *subpaths and *special_paths get updated. But then it is not > returning from there when it should. Instead, the control passes to > the end of function where *subpaths is again populated : > *subpaths = lappend(*subpaths, path); > which leads to an extra child with partial subpath getting added.
Boy, what a dumb mistake on my part. Thanks for finding the bug, Rajkumar. Thanks for analyzing it, Amit. I have committed the fix. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company