Re: Fix BUG #17335: Duplicate result rows in Gather node
David Rowley <dgrowleyml@gmail.com>
From: David Rowley <dgrowleyml@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Yura Sokolov <y.sokolov@postgrespro.ru>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2022-02-08T21:10:51Z
Lists: pgsql-hackers
Attachments
- do_some_plan_validation_during_create_plan_v2.patch (text/plain) patch v2
Thanks for having a look at this. On Fri, 4 Feb 2022 at 13:48, Robert Haas <robertmhaas@gmail.com> wrote: > I think the actual rule is: every path under a Gather or GatherMerge > must be parallel-safe. I've adjusted the patch so that it counts parallel_aware and parallel_safe Paths independently and verifies everything below a Gather[Merge] is parallel_safe. The diff stat currently looks like: src/backend/optimizer/plan/createplan.c | 230 1 file changed, 230 insertions(+) I still feel this is quite a bit of code for what we're getting here. I'd be more for it if the path traversal function existed for some other reason and I was just adding the callback functions and Asserts. I'm keen to hear what others think about that. David
Commits
-
Consider parallel awareness when removing single-child Appends
- 2ccd8fb29d74 12.10 landed
- f8807e7742e5 13.6 landed
- 357ff66153b4 14.2 landed
- f9a74c1498d2 15.0 landed
-
Suppress Append and MergeAppend plan nodes that have a single child.
- 8edd0e79460b 12.0 cited