Re: Plan caching and serialization for reuse across executions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrei Lepikhov <lepihov(at)gmail(dot)com>
Cc: Kirill Reshke <reshkekirill(at)gmail(dot)com>, Xuan Chen <cx0222(at)vip(dot)qq(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Plan caching and serialization for reuse across executions
Date: 2025-08-18 14:18:34
Message-ID: 348770.1755526714@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrei Lepikhov <lepihov(at)gmail(dot)com> writes:
> 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.

That's fairly scary, considering all the work that's been done to
intentionally fuzz different queries together to make them look
like "the same query" to pg_stat_statements. While that's fine
for pg_stat_statements, it makes it really questionable to assume
that QueryId is a sufficient proof of semantic equivalence.

(I recall having objected to the whole concept of moving queryjumble.c
into core on the grounds that it could not serve multiple masters.
I think this proves my point...)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jelte Fennema-Nio 2025-08-18 14:23:52 Re: Retail DDL
Previous Message Andrei Lepikhov 2025-08-18 14:09:55 Re: Plan caching and serialization for reuse across executions