diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2022-12-05 12:36:40 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2022-12-05 12:36:40 -0500 |
commit | d69d01ba9d8d774487032459ebb83d2086715f01 (patch) | |
tree | 76b2daf0834bd0902041fa34d10eed34a38ccf82 /src/backend/optimizer/util/pathnode.c | |
parent | 35ce24c333cf6dee3c92bc5f67553c7720bd9988 (diff) | |
download | postgresql-d69d01ba9d8d774487032459ebb83d2086715f01.tar.gz postgresql-d69d01ba9d8d774487032459ebb83d2086715f01.zip |
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
Diffstat (limited to 'src/backend/optimizer/util/pathnode.c')
-rw-r--r-- | src/backend/optimizer/util/pathnode.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index 5379c087a1f..55deee555ae 100644 --- a/src/backend/optimizer/util/pathnode.c +++ b/src/backend/optimizer/util/pathnode.c @@ -4246,6 +4246,7 @@ do { \ FLAT_COPY_PATH(mpath, path, MemoizePath); REPARAMETERIZE_CHILD_PATH(mpath->subpath); + ADJUST_CHILD_ATTRS(mpath->param_exprs); new_path = (Path *) mpath; } break; |