Re: Memoize in between of two JOIN nodes - Mailing list pgsql-bugs

From Richard Guo
Subject Re: Memoize in between of two JOIN nodes
Date
Msg-id CAMbWs4_qMy5ZGCRuSCEe9hB1r_G69neVLJPDtykN+t+umCOo6g@mail.gmail.com
Whole thread Raw
In response to Memoize in between of two JOIN nodes  (Andrei Lepikhov <lepihov@gmail.com>)
Responses Re: Memoize in between of two JOIN nodes
List pgsql-bugs
On Thu, Mar 6, 2025 at 8:17 PM Andrei Lepikhov <lepihov@gmail.com> wrote:
> Playing with memoisation, I found the case where the Memoize is put over
> a JOIN node (see attachment).
> I recall a discussion we had with Richard in which he mentioned [1] that
> this feature is still not implemented and is hard to design.
> I'm not sure, but may it be a sign of a potential bug?

In your case, the Memoize node is added on top of a base relation of a
subquery RTE, not a join relation.  The final plan might be kind of
confusing because the SubqueryScan node is considered trivial and is
removed from the plan tree.

Thanks
Richard



pgsql-bugs by date:

Previous
From: Richard Guo
Date:
Subject: Re: BUG #18832: Segfault in GrantLockLocal
Next
From: Christopher Inokuchi
Date:
Subject: Window Functions with identical PARTITION BY and ORDER BY clauses evaluated separately