pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Re-disallow Memoize for parameterized nested loops with join fil
Date: Mon, 22 Jan 2024 09:45:21 +0000
Message-ID: <E1rRqrp-002YrV-9G@gemulon.postgresql.org> (raw)

Re-disallow Memoize for parameterized nested loops with join filters

This was previously fixed in 9e215378d but got broken again as a result
of 2489d76c4.  It seems that commit causes ppi_clauses to contain
duplicate clauses and it's no longer safe to check the list_length of
that list to determine if there are join conditions other than what's
mentioned in ppi_clauses.

Here we adjust the check to count the distinct rinfo_serial mentioned in
ppi_clauses.  We expect that extra->restrictlist won't have duplicate
rinfo_serials.

Reported-by: Amadeo Gallardo
Author: Richard Guo
Discussion: https://postgr.es/m/CADFREbW-BLJd7-a5J%2B5wjVumeFG1ByXiSOFzMtkmY_SDWckTxw%40mail.gmail.com
Backpatch-through: 16, where 2489d76c4 was introduced.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2bcf0785cd1080b85f0d2ccd595b195970730491

Modified Files
--------------
src/backend/optimizer/path/joinpath.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1rRqrp-002YrV-9G@gemulon.postgresql.org>
Permalink:  ../E1rRqrp-002YrV-9G@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rRqrp-002YrV-9G@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: drowley@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Re-disallow Memoize for parameterized nested loops with join fil
  In-Reply-To: <E1rRqrp-002YrV-9G@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox