Re: Plan caching and serialization for reuse across executions

From: Andrei Lepikhov <lepihov(at)gmail(dot)com>
To: Kirill Reshke <reshkekirill(at)gmail(dot)com>, Xuan Chen <cx0222(at)vip(dot)qq(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Plan caching and serialization for reuse across executions
Date: 2025-08-18 13:59:37
Message-ID: 94219cd1-ba52-43e6-94d1-edb5bea864b8@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 18/8/2025 13:50, Kirill Reshke wrote:
> Hi!
>
> On Sun, 17 Aug 2025 at 23:34, Xuan Chen <cx0222(at)vip(dot)qq(dot)com> wrote:
>>
>> - Any relevant references in the source code (planner, plancache.c, executor) that I should study would be very helpful.
>
> Here is extension implementing saving and restoring plans[0]
>
>
> [0]https://github.com/postgrespro/sr_plan
>
I wouldn't recommend this obsolete version of the extension. Since the
QueryId was introduced, we have redesigned it extensively, with the
basic idea that QueryId serves as a 'query plan class' and that matching
parse trees provide a proof of matching incoming queries with their
corresponding [parameterised] plans.

--
regards, Andrei Lepikhov

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrei Lepikhov 2025-08-18 14:09:55 Re: Plan caching and serialization for reuse across executions
Previous Message Andres Freund 2025-08-18 13:58:28 Re: make -C src/test/isolation failure in index-killtuples due to btree_gist