Re: Allowing parallel-safe initplans
Richard Guo <guofenglinux@gmail.com>
From: Richard Guo <guofenglinux@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2023-04-19T02:42:08Z
Lists: pgsql-hackers
On Tue, Apr 18, 2023 at 9:33 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > Richard Guo <guofenglinux@gmail.com> writes: > > It seems that in this case the top_plan does not have any extParam, so > > the Gather node that is added atop the top_plan does not have a chance > > to get its initParam filled in set_param_references(). > > Oh, so maybe we'd need to copy up extParam as well? But it's largely > moot, since I don't see a good way to avoid breaking the EXPLAIN > output. Yeah, seems breaking the EXPLAIN output is inevitable if we move the initPlans to the Gather node. So maybe we need to keep the logic as in v1 patch, i.e. avoid adding a Gather node when top_plan has initPlans. If we do so, I wonder if we need to explain the potential wrong results issue in the comments. Thanks Richard
Commits
-
Account for optimized MinMax aggregates during SS_finalize_plan.
- ce0d1654463e 16.4 landed
- 7f90a5dc3686 13.16 landed
- 686c995fc222 12.20 landed
- 5ac340602e74 14.13 landed
- 4ac385adc5b7 15.8 landed
- d0d44049d126 17.0 landed
-
Add test case showing that commit d0d44049d fixed a live bug.
- 779ac2c74bd1 17.0 landed
-
Allow plan nodes with initPlans to be considered parallel-safe.
- e08d74ca1342 17.0 landed
-
Allow parallel workers to execute subplans.
- 5e6d8d2bbbca 10.0 cited
-
Mark a query's topmost Paths parallel-unsafe if they will have initPlans.
- ab77a5a4561f 10.0 cited