| From: | Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> |
|---|---|
| To: | Gleb Kashkin <g(dot)kashkin(at)postgrespro(dot)ru> |
| Cc: | Alexander Pyhalov <a(dot)pyhalov(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Parameterized append subpaths |
| Date: | 2026-09-23 11:05:48 |
| Message-ID: | CAPmGK15wGDUj_gnzaS8JrL7xyDt19FGsfDs8nrSUii+1enKcCg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Gleb,
On Wed, Sep 23, 2026 at 6:12 PM Gleb Kashkin <g(dot)kashkin(at)postgrespro(dot)ru> wrote:
> We found another way to address the issue. It could be better suited for
> current path selection model:
> Instead of keeping all parameterized foreign paths, we could
> re-parameterize the ones that were left after add_path() domination, as
> is already done with other path types. This requires a new FDW interface
> function, but allows to keep current path domination logic and build
> additional foreign paths only when they are truly required, like in
> parametrized NestLoop.
>
> The first attached patch implements path reparameterization in
> postgres_fwd and adds it to reparameterize_path().
> The second patch is optional, it adds a cache for parameterized paths in
> postgres_fdw, so there is no excessive roundtrip for remote estimate
> EXPLAIN for paths that have already been costed and rejected.
+1
I proposed this FDW API a long time ago as part of the
foreign-table-inheritance work [1][2]. Have you looked at it?
Best regards,
Etsuro Fujita
[1] https://www.postgresql.org/message-id/530C7464.6020006%40lab.ntt.co.jp
[2] https://www.postgresql.org/message-id/532AE62A.6020307%40lab.ntt.co.jp
| From | Date | Subject | |
|---|---|---|---|
| Next Message | John Naylor | 2026-09-23 11:07:26 | Re: HASH INDEX builds seems confused |
| Previous Message | Michael Paquier | 2026-09-23 10:57:55 | Re: Support for 8-byte TOAST values, round two |