Re: [PATCH] postgres_fdw: Fix cost estimation for semi join pushdown

From: solai v <solai(dot)cdac(at)gmail(dot)com>
To: zhang ziming <toren(dot)zhang(at)outlook(dot)com>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] postgres_fdw: Fix cost estimation for semi join pushdown
Date: 2026-10-09 07:29:55
Message-ID: CAF0whueg2ehZ0pAG0TAFt6NPfV3uxNFQQnf=1NCvtQjdDSy0ig@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

Thank you for the updated v2 patch. I reproduced the issue using the
provided test case. With the unpatched code, the planner chose a local
Hash Semi Join, followed by Sort and Limit, instead of pushing down
the semi-join. After applying the patch, the planner selected a single
Foreign Scan, with the semi-join, filters, ORDER BY, LIMIT, and OFFSET
pushed down to the remote server as intended. I also ran the
postgres_fdw regression tests, including postgres_fdw and
query_cancel, along with the eval_plan_qual isolation test. All three
tests passed. The change looks good to me.
Thank you for addressing this issue.

Regards,
Solai

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tender Wang 2026-10-09 08:08:13 Re: "failed to build any N-way joins" from a five-relation query
Previous Message lin teletele 2026-10-09 07:20:57 [PATCH v1] Stale row estimates for transition tables