Re: Check lateral references within PHVs for memoize cache keys

Поиск
Список
Период
Сортировка
От Richard Guo
Тема Re: Check lateral references within PHVs for memoize cache keys
Дата
Msg-id CAMbWs4-n-bc=cxXwn7oY0E8YojSwiVLUpz6+OqPre3_YJs1_NQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Check lateral references within PHVs for memoize cache keys  (Richard Guo <guofenglinux@gmail.com>)
Ответы Re: Check lateral references within PHVs for memoize cache keys
Список pgsql-hackers
On Mon, Mar 18, 2024 at 4:36 PM Richard Guo <guofenglinux@gmail.com> wrote:
> Here is another rebase over master so it applies again.  I also added a
> commit message to help review.  Nothing else has changed.

AFAIU currently we do not add Memoize nodes on top of join relation
paths.  This is because the ParamPathInfos for join relation paths do
not maintain ppi_clauses, as the set of relevant clauses varies
depending on how the join is formed.  In addition, joinrels do not
maintain lateral_vars.  So we do not have a way to extract cache keys
from joinrels.

(Besides, there are places where the code doesn't cope with Memoize path
on top of a joinrel path, such as in get_param_path_clause_serials.)

Therefore, when extracting lateral references within PlaceHolderVars,
there is no need to consider those that are due to be evaluated at
joinrels.

Hence, here is v7 patch for that.  In passing, this patch also includes
a comment explaining that Memoize nodes are currently not added on top
of join relation paths (maybe we should have a separate patch for this?).

Thanks
Richard

Вложения

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

Предыдущее
От: "Li, Yong"
Дата:
Сообщение: Re: Separate HEAP WAL replay logic into its own file
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Inval reliability, especially for inplace updates