Fix Memoize to work with partitionwise joining.
Tom Lane <tgl@sss.pgh.pa.us>
Fix Memoize to work with partitionwise joining. A couple of places weren't up to speed for this. By sheer good luck, we didn't fail but just selected a non-memoized join plan, at least in the test case we have. Nonetheless, it's a bug, and I'm not quite sure that it couldn't have worse consequences in other examples. So back-patch to v14 where Memoize came in. Richard Guo Discussion: https://postgr.es/m/CAMbWs48GkNom272sfp0-WeD6_0HSR19BJ4H1c9ZKSfbVnJsvRg@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/optimizer/path/joinpath.c | modified | +13 −1 |
| src/backend/optimizer/util/pathnode.c | modified | +1 −0 |
| src/include/nodes/pathnodes.h | modified | +2 −2 |
| src/test/regress/expected/memoize.out | modified | +39 −0 |
| src/test/regress/sql/memoize.sql | modified | +19 −0 |
Discussion
- MemoizePath fails to work for partitionwise join 3 messages · 2022-12-05 → 2022-12-06