Re: Allowing parallel-safe initplans
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Guo <guofenglinux@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2023-04-17T15:04:33Z
Lists: pgsql-hackers
Richard Guo <guofenglinux@gmail.com> writes: > So now it seems that the breakage of regression tests is more severe > than being cosmetic. I wonder if we need to update the comments to > indicate the potential wrong results issue if we move the initPlans to > the Gather node. I wondered about that too, but how come neither of us saw non-cosmetic failures (ie, actual query output changes not just EXPLAIN changes) when we tried this? Maybe the case is somehow not exercised, but if so I'm more worried about adding regression tests than comments. I think actually that it does work beyond the EXPLAIN weirdness, because since e89a71fb4 the Gather machinery knows how to transmit the values of Params listed in Gather.initParam to workers, and that is filled in setrefs.c in a way that looks like it'd work regardless of whether the Gather appeared organically or was stuck on by the debug_parallel_query hackery. I've not tried to verify that directly though. regards, tom lane
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