Re: Check lateral references within PHVs for memoize cache keys - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Check lateral references within PHVs for memoize cache keys
Date
Msg-id 1724688.1688837323@sss.pgh.pa.us
Whole thread Raw
In response to Re: Check lateral references within PHVs for memoize cache keys  (Richard Guo <guofenglinux@gmail.com>)
Responses Re: Check lateral references within PHVs for memoize cache keys
Re: Check lateral references within PHVs for memoize cache keys
Re: Check lateral references within PHVs for memoize cache keys
List pgsql-hackers
Richard Guo <guofenglinux@gmail.com> writes:
> Rebase the patch on HEAD as cfbot reminds.

This fix seems like a mess.  The function that is in charge of filling
RelOptInfo.lateral_vars is extract_lateral_references; or at least
that was how it was done up to now.  Can't we compute these additional
references there?  If not, maybe we ought to just merge
extract_lateral_references into create_lateral_join_info, rather than
having the responsibility split.  I also wonder whether this change
isn't creating hidden dependencies on RTE order (which would likely be
bugs), since create_lateral_join_info itself examines the lateral_vars
lists as it walks the rtable.

More generally, it's not clear to me why we should need to look inside
lateral PHVs in the first place.  Wouldn't the lateral PHV itself
serve fine as a cache key?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Joseph Koshakow
Date:
Subject: Re: DecodeInterval fixes
Next
From: Tom Lane
Date:
Subject: Re: Infinite Interval