Missing MaterialPath support in reparameterize_path_by_child
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Date: 2022-12-02T02:55:23Z
Lists: pgsql-hackers
Attachments
- fix-reparameterize_path_by_child.patch (text/x-diff) patch
Whilst fooling with my outer-join-aware-Vars patch, I tripped across a multi-way join query that failed with ERROR: could not devise a query plan for the given query when enable_partitionwise_join is on. I traced that to the fact that reparameterize_path_by_child() omits support for MaterialPath, so that if the only surviving path(s) for a child join include materialization steps, we'll fail outright to produce a plan for the parent join. Unfortunately, I don't have an example that produces such a failure against HEAD. It seems certain to me that such cases exist, though, so I'd like to apply and back-patch the attached. I'm suspicious now that reparameterize_path() should be extended likewise, but I don't really have any hard evidence for that. regards, tom lane
Commits
-
Add missing MaterialPath support in reparameterize_path[_by_child].
- 6eb2f0ed4cd5 16.0 landed
-
Fix generate_partitionwise_join_paths() to tolerate failure.
- fe12f2f8fa60 16.0 landed
- ec3daeec316f 14.7 landed
- bf8fd64ff5e6 15.2 landed
- 4ebca555cf23 13.10 landed
- 2df073313934 11.19 landed
- 1ff549e844cc 12.14 landed