Re: Check lateral references within PHVs for memoize cache keys

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Check lateral references within PHVs for memoize cache keys
Date: 2022-12-30 03:00:25
Message-ID: CAMbWs48TGnh8s=9-hJge9Et4Crf9q+_oU4FVekLoX4ommi4CVg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 9, 2022 at 5:16 PM Richard Guo <guofenglinux(at)gmail(dot)com> wrote:

> Actually we do have checked PHVs for lateral references, earlier in
> create_lateral_join_info. But that time we only marked lateral_relids
> and direct_lateral_relids, without remembering the lateral expressions.
> So I'm wondering whether we can fix that by fetching Vars (or PHVs) of
> lateral references within PlaceHolderVars and remembering them in the
> baserel's lateral_vars.
>
> Attach a draft patch to show my thoughts.
>

Update the patch to fix test failures.

Thanks
Richard

Attachment Content-Type Size
v2-0001-Check-lateral-refs-within-PHVs-for-memoize-cache-.patch application/octet-stream 6.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2022-12-30 03:01:35 Re: Decoupling antiwraparound autovacuum from special rules around auto cancellation
Previous Message Ian Lawrence Barwick 2022-12-30 01:57:52 Re: Getting rid of SQLValueFunction