Re: postgres_fdw: wrong results with self join + enable_nestloop off

From: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
To: Nishant Sharma <nishant(dot)sharma(at)enterprisedb(dot)com>
Cc: Suraj Kharage <suraj(dot)kharage(at)enterprisedb(dot)com>, Richard Guo <guofenglinux(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: postgres_fdw: wrong results with self join + enable_nestloop off
Date: 2023-06-14 06:49:37
Message-ID: CAPmGK16sHHSt4r_zEG6Ocba=SbR8pexXF0sdWYSU6OPLr6_WPA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 5, 2023 at 10:19 PM Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> wrote:
> To avoid this issue, I am wondering if we should modify
> add_paths_to_joinrel() in back branches so that it just disallows the
> FDW to consider pushing down joins when the restrictlist has
> pseudoconstant clauses. Attached is a patch for that.

I think that custom scans have the same issue, so I modified the patch
further so that it also disallows custom-scan providers to consider
join pushdown in add_paths_to_joinrel() if necessary. Attached is a
new version of the patch.

Best regards,
Etsuro Fujita

Attachment Content-Type Size
disallow-join-pushdown-if-pseudoconstants-v2.patch application/octet-stream 6.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Guo 2023-06-14 06:55:36 Re: ERROR: wrong varnullingrels (b 3) (expected (b)) for Var 2/1
Previous Message Amit Langote 2023-06-14 06:49:04 Re: Views no longer in rangeTabls?