Re: Querying one partition in a function takes locks on all partitions - Mailing list pgsql-general

From David Rowley
Subject Re: Querying one partition in a function takes locks on all partitions
Date
Msg-id CAApHDvp3EDrVhGjmb21bceJ5-Y7iXKOn2UGG3-ngp_9ob_mpLw@mail.gmail.com
Whole thread Raw
In response to Re: Querying one partition in a function takes locks on all partitions  (Renan Alves Fonseca <renanfonseca@gmail.com>)
Responses Re: Querying one partition in a function takes locks on all partitions
Re: Querying one partition in a function takes locks on all partitions
List pgsql-general
On Sat, 29 Mar 2025 at 10:30, Renan Alves Fonseca
<renanfonseca@gmail.com> wrote:
> Currently, in the SQL function path the plan is always generic. The
> planner ignores the function arguments. The plan_cache_mode setting
> has no effect in this path.
>
> I agree that the docs should be more explicit about this. There is a
> high penalty for using generic plans in complex functions.

If you have any suggestions about where you think those should be
added or wording for that, please feel free to suggest.

For the part that's specific to partitioning, I've suggested some
additional wording in the relevant spot in [1].

David

[1] https://postgr.es/m/CAApHDvogvzANoTOCyXUWgEuPFx1nT6S63aAN0bDRSJ=TaGBWew@mail.gmail.com



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Quesion about querying distributed databases
Next
From: Tom Lane
Date:
Subject: Re: Querying one partition in a function takes locks on all partitions