Re: Memoize ANTI and SEMI JOIN inner
От | Richard Guo |
---|---|
Тема | Re: Memoize ANTI and SEMI JOIN inner |
Дата | |
Msg-id | CAMbWs492QOUxvMadX4OxGY+hc8Dq7jq44sR_+-M3YndJzQikNw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Memoize ANTI and SEMI JOIN inner (David Rowley <dgrowleyml@gmail.com>) |
Список | pgsql-hackers |
On Mon, Mar 31, 2025 at 6:39 PM David Rowley <dgrowleyml@gmail.com> wrote: > 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? Right. This code is from the master branch, not the patch. It caught my attention while I was reviewing the patch and noticed it modifies this code. Thanks Richard
В списке pgsql-hackers по дате отправления: