Re: foreign join error "variable not found in subplan target list"

From: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
To: Richard Guo <guofenglinux(at)gmail(dot)com>
Cc: Alexander Pyhalov <a(dot)pyhalov(at)postgrespro(dot)ru>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: foreign join error "variable not found in subplan target list"
Date: 2022-09-12 04:20:49
Message-ID: CAPmGK16Sqqm_s9sXZBCCvsK_F-kTQZvDT6j2+Gxg7VAcdwaQiw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Aug 31, 2022 at 6:52 PM Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> wrote:
> On Wed, Aug 31, 2022 at 6:27 PM Richard Guo <guofenglinux(at)gmail(dot)com> wrote:
> > Hmm, yes, the EPQ path does not need to compete with others in add_path,
> > so its cost does not matter too much. And the comment just above
> > GetExistingLocalJoinPath says:
> >
> > * Since the plan created using this path will presumably only be used to
> > * execute EPQ checks, efficiency of the path is not a concern.
> >
> > But still I feel it's not a good practice to not update the cost and
> > width fields after calling add_new_columns_to_pathtarget(). How about we
> > add some comments here explaining why we do not need to adjust the
> > estimates for the EPQ path?
>
> I agree with you on that point. I’ll update the patch as such in the
> next version.

Here is an updated patch for that. Other changes:

* I modified the patch so that we adjust the tlist of the EPQ path if
necessary, using the idea discussed upthread.
* I tweaked other comments a little bit.

Best regards,
Etsuro Fujita

Attachment Content-Type Size
v1-0001-Include-local-conds-in-epq-pathtarget-efujita-3.patch application/octet-stream 12.6 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Masahiko Sawada 2022-09-12 04:51:54 Re: Excessive number of replication slots for 12->14 logical replication
Previous Message houzj.fnst@fujitsu.com 2022-09-11 14:55:22 RE: Excessive number of replication slots for 12->14 logical replication