Re: Querying one partition in a function takes locks on all partitions

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Renan Alves Fonseca <renanfonseca(at)gmail(dot)com>, David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: Evgeny Morozov <postgresql4(at)realityexists(dot)net>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Querying one partition in a function takes locks on all partitions
Date: 2025-03-31 17:08:02
Message-ID: f29565cb8b0cea781e6334c94c89d9b575a8023a.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 2025-03-31 at 18:41 +0200, Renan Alves Fonseca wrote:
> I would add another Note below like:
> "Except when inlined, an SQL function is always executed with a
> generic plan. This behavior may not be desired in some situations, and
> it will be fixed in future versions."

But that is not true, as far as I can tell: just like any other prepared
statement, it may keep using custom plans.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2025-03-31 17:16:01 Re: Querying one partition in a function takes locks on all partitions
Previous Message Renan Alves Fonseca 2025-03-31 16:41:54 Re: Querying one partition in a function takes locks on all partitions