Band-aid solution for problems with SubPlans used in hash join clauses,
Tom Lane <tgl@sss.pgh.pa.us>
Band-aid solution for problems with SubPlans used in hash join clauses, per report from Andrew Holm-Hansen. The difficulty arises from the fact that the planner allowed a Hash node's hashkeys to share substructure with the parent HashJoin node's hashclauses, plus some rather bizarre choices about who initializes what during executor startup. A cleaner but more invasive solution is to not store hashkeys separately in the plan tree at all, but let the HashJoin node deconstruct hashclauses during executor startup. I plan to fix it that way in HEAD.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/executor/nodeHashjoin.c | modified | +2 −2 |
| src/backend/optimizer/plan/createplan.c | modified | +6 −4 |