pgsql: Fix incorrect hash equality operator bug in Memoize

From: David Rowley <drowley(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix incorrect hash equality operator bug in Memoize
Date: 2021-11-08 01:41:49
Message-ID: E1mjtfR-0003k6-UC@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix incorrect hash equality operator bug in Memoize

In v14, because we don't have a field in RestrictInfo to cache both the
left and right type's hash equality operator, we just restrict the scope
of Memoize to only when the left and right types of a RestrictInfo are the
same.

In master we add another field to RestrictInfo and cache both hash
equality operators.

Reported-by: Jaime Casanova
Author: David Rowley
Discussion: https://postgr.es/m/20210929185544.GB24346%40ahch-to
Backpatch-through: 14

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1f194ed6c26e67ce92437729fc46193cc6e913d2

Modified Files
--------------
src/backend/optimizer/plan/initsplan.c | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2021-11-08 09:10:31 pgsql: Translation updates
Previous Message David Rowley 2021-11-08 01:41:01 pgsql: Fix incorrect hash equality operator bug in Memoize