Re: Check lateral references within PHVs for memoize cache keys
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Guo <guofenglinux@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2023-07-08T17:28:43Z
Lists: 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
Commits
-
Check lateral references within PHVs for memoize cache keys
- 069d0ff0226b 18.0 landed
-
Doc: update old reference to "result cache"
- 571377dfb83d 14.9 landed
- 3883ef3236e5 15.4 landed
- 6d8b5f49f0e1 16.0 landed
- c23e7ea4d6a4 17.0 landed