Re: Memoize ANTI and SEMI JOIN inner

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Memoize ANTI and SEMI JOIN inner
Дата
Msg-id CAApHDvp0GagPFiu2ZDoWeZu+UaPpDwzsFTcT-gvp3=X7f002zw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Memoize ANTI and SEMI JOIN inner  (Richard Guo <guofenglinux@gmail.com>)
Ответы Re: Memoize ANTI and SEMI JOIN inner
Список pgsql-hackers
On Mon, 31 Mar 2025 at 22:03, Richard Guo <guofenglinux@gmail.com> wrote:
> I reviewed this patch and I have some concerns about the following
> code:
>
>     if (extra->inner_unique &&
>         (inner_path->param_info == NULL ||
>          bms_num_members(inner_path->param_info->ppi_serials) <
>          list_length(extra->restrictlist)))
>         return NULL;
>
> I understand that this check is used to ensure that the entire join
> condition is parameterized in the case of unique joins, so that we can
> safely mark the cache entry as complete after reading the first tuple.
> However, ppi_clauses includes join clauses available from all outer
> rels, not just the current outer rel, while extra->restrictlist only
> includes the restriction clauses for the current join.  This means the
> check could pass even if a restriction clause isn't parameterized, as
> long as another join clause, which doesn't belong to the current join,
> is included in ppi_clauses.

Shouldn't you be more concerned about master here than the patch given
that the code you pasted is from master?

David



В списке pgsql-hackers по дате отправления: