forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitfe12f2f
committed
Fix generate_partitionwise_join_paths() to tolerate failure.
We might fail to generate a partitionwise join, becausereparameterize_path_by_child() does not support all path types.This should not be a hard failure condition: we should just fall backto a non-partitioned join. However, generate_partitionwise_join_pathsdid not consider this possibility and would emit the (misleading)error "could not devise a query plan for the given query" if we'dfailed to make any paths for a child join. Fix it to give up onpartitionwise joining if so. (The accepted technique for giving upappears to be to set rel->nparts = 0, which I find pretty bizarre,but there you have it.)I have not added a test case because there'd be little point:any omissions of this sort that we identify would soon get fixedby extending reparameterize_path_by_child(), so the test would stopproving anything. However, right now there is a known test case basedon failure to cover MaterialPath, and with that I've found that thisis broken in all supported versions. Hence, patch all the way back.Original report and patch by me; thanks to Richard Guo foridentifying a test case that works against committed versions.Discussion:https://postgr.es/m/1854233.1669949723@sss.pgh.pa.us1 parent6b423ec commitfe12f2f
1 file changed
+14
-2
lines changedLines changed: 14 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4273 | 4273 |
| |
4274 | 4274 |
| |
4275 | 4275 |
| |
4276 |
| - | |
| 4276 | + | |
4277 | 4277 |
| |
4278 | 4278 |
| |
| 4279 | + | |
| 4280 | + | |
| 4281 | + | |
| 4282 | + | |
| 4283 | + | |
| 4284 | + | |
| 4285 | + | |
| 4286 | + | |
| 4287 | + | |
| 4288 | + | |
| 4289 | + | |
| 4290 | + | |
4279 | 4291 |
| |
4280 | 4292 |
| |
4281 |
| - | |
| 4293 | + | |
4282 | 4294 |
| |
4283 | 4295 |
| |
4284 | 4296 |
| |
|
0 commit comments
Comments
(0)