Re: [BUGS] [postgresql 10 beta3] unrecognized node type: 90
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, Noah Misch <noah@leadboat.com>,
"Adam,
Etienne (Nokia-TECH/Issy Les Moulineaux)" <etienne.adam@nokia.com>,
PostgreSQL Bugs <pgsql-bugs@postgresql.org>,
"Duquesne,
Pierre (Nokia-TECH/Issy Les Moulineaux)" <pierre.duquesne@nokia.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2017-08-27T20:29:41Z
Lists: pgsql-bugs, pgsql-hackers
Attachments
- fix-gather-rescan-1.patch (text/x-diff) patch
I wrote: > I think that the correct fix probably involves marking each parallel scan > plan node as dependent on a pseudo executor parameter, which the parent > Gather or GatherMerge node would flag as being changed on each rescan. > This would cue the plan layers in between that they cannot optimize on the > assumption that the leader's instance of the parallel scan will produce > exactly the same rows as it did last time, even when "nothing else > changed". The "wtParam" pseudo parameter that's used for communication > between RecursiveUnion and its descendant WorkTableScan node is a good > model for what needs to happen. Here is a draft patch for this. It's a bit different from wtParam in that the special parameter isn't allocated until createplan.c time, so that we don't eat a parameter slot if we end up choosing a non-parallel plan; but otherwise things are comparable. I could use some feedback on whether this is marking dependent child nodes sanely. As written, any plan node that's marked parallel_aware is assumed to need a dependency on the parent Gather or GatherMerge's rescan param --- and the planner will now bitch if a parallel_aware plan node is not under any such Gather. Is this reasonable? I do not see any documentation that defines the parallel_aware field with enough clarity to be very sure about it. I included the heap_parallelscan_nextpage hack I'm using to make the original failure reproducible, but that hunk is not meant for commit. Also, the regression test case is the same as in a2b70c89c. regards, tom lane
Commits
-
Separate reinitialization of shared parallel-scan state from ExecReScan.
- d6a149f4e6a1 10.0 landed
- 41b0dd987d44 11.0 landed
-
Restore test case from a2b70c89ca1a5fcf6181d3c777d82e7b83d2de1b.
- 6c2c5bea3cec 11.0 landed
- 5816ddc707e0 10.0 landed
-
Force rescanning of parallel-aware scan nodes below a Gather[Merge].
- 54eac6e8c552 10.0 landed
- 7df2c1f8daeb 11.0 landed
-
Fix ExecReScanGatherMerge.
- de1ca6919ff8 10.0 landed
- a2b70c89ca1a 11.0 landed
-
Add missing call to ExecReScanGatherMerge.
- 29990634c76a 10.0 landed
- 1295a777882b 11.0 landed