pgsql: Fix Memoize to work with partitionwise joining.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix Memoize to work with partitionwise joining.
Date: 2022-12-05 17:36:47
Message-ID: E1p2FOZ-0027w3-0y@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/c959f84c2b770bc136ade3cfd11f6063a51d2708

Modified Files
--------------
src/backend/optimizer/path/joinpath.c | 14 ++++++++++++-
src/backend/optimizer/util/pathnode.c | 1 +
src/include/nodes/pathnodes.h | 4 ++--
src/test/regress/expected/memoize.out | 39 +++++++++++++++++++++++++++++++++++
src/test/regress/sql/memoize.sql | 19 +++++++++++++++++
5 files changed, 74 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2022-12-05 22:40:17 pgsql: initdb: Refactor PG_CMD_PUTS loops
Previous Message Peter Eisentraut 2022-12-05 08:03:20 pgsql: pg_dump: Remove "blob" terminology