Re: Parameterized append subpaths - Mailing list pgsql-hackers

From Etsuro Fujita
Subject Re: Parameterized append subpaths
Date
Msg-id CAPmGK15wGDUj_gnzaS8JrL7xyDt19FGsfDs8nrSUii+1enKcCg@mail.gmail.com
Whole thread
In response to Re: Parameterized append subpaths  (Gleb Kashkin <g.kashkin@postgrespro.ru>)
List pgsql-hackers
Hi Gleb,

On Wed, Sep 23, 2026 at 6:12 PM Gleb Kashkin <g.kashkin@postgrespro.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



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Support for 8-byte TOAST values, round two
Next
From: John Naylor
Date:
Subject: Re: HASH INDEX builds seems confused