Fix Asserts in calc_non_nestloop_required_outer().
Tom Lane <tgl@sss.pgh.pa.us>
Fix Asserts in calc_non_nestloop_required_outer(). These were not testing the same thing as the comparable Assert in calc_nestloop_required_outer(), because we neglected to map the given Paths' relids to top-level relids. When considering a partition child join the latter is the correct thing to do. This oversight is old, but since it's only an overly-weak Assert check there doesn't seem to be much value in back-patching. Richard Guo (with cosmetic changes and comment updates by me) Discussion: https://postgr.es/m/CAMbWs49sqbe9GBZ8sy8dSfKRNURgicR85HX8vgzcgQsPF0XY1w@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/optimizer/path/joinpath.c | modified | +5 −2 |
| src/backend/optimizer/util/pathnode.c | modified | +24 −2 |
Discussion
- Fix bogus Asserts in calc_non_nestloop_required_outer 13 messages · 2023-08-03 → 2024-01-10