Re: Make query ID more portable

From: Andrey Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>, Jim Finnerty <jfinnert(at)amazon(dot)com>
Subject: Re: Make query ID more portable
Date: 2021-10-14 12:02:15
Message-ID: f8845cfb-4dcd-29f6-3a27-fd0ec29a5313@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 14/10/21 10:40, Julien Rouhaud wrote:
> On Thu, Oct 14, 2021 at 12:37 PM Andrey Lepikhov
> <a(dot)lepikhov(at)postgrespro(dot)ru> wrote:
>>
>> On 12/10/21 18:45, Bruce Momjian wrote:
>>> On Tue, Oct 12, 2021 at 09:40:47AM -0400, Tom Lane wrote:
>>>> Andrey Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru> writes:
> I think that there are just too many arbitrary decisions that could be
> made on what exactly should be a query identifier to have a single
> in-core implementation.
Yes, and I use such custom decision too. But core jumbling code
implements good idea and can be generalized for reuse. Patch from
previous letter and breaking down of JumbleState can allow coders to
implement their codes based on queryjumble.c module with smaller changes.

> If you do sharding, you already have to
> properly configure each node, so configuring your custom query id
> extension shouldn't be a big problem.
My project is about adaptive query optimization techniques. It is not
obvious how to match (without a field in Query struct) a post parse and
an execution phases because of nested queries.
Also, if we use queryId in an extension, we interfere with
pg_stat_statements.

--
regards,
Andrey Lepikhov
Postgres Professional

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2021-10-14 12:09:50 Re: [PATCH] Proposal for HIDDEN/INVISIBLE column
Previous Message Dilip Kumar 2021-10-14 11:49:59 Re: [Bug] Logical Replication failing if the DateStyle is different in Publisher & Subscriber