Re: pg_stat_statements and "IN" conditions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Andrey V(dot) Lepikhov" <a(dot)lepikhov(at)postgrespro(dot)ru>
Cc: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, Zhihong Yu <zyu(at)yugabyte(dot)com>, David Steele <david(at)pgmasters(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Greg Stark <stark(at)mit(dot)edu>, Pavel Trukhanov <pavel(dot)trukhanov(at)gmail(dot)com>
Subject: Re: pg_stat_statements and "IN" conditions
Date: 2022-01-05 05:13:30
Message-ID: 4186088.1641359610@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Andrey V. Lepikhov" <a(dot)lepikhov(at)postgrespro(dot)ru> writes:
> On 1/5/22 4:02 AM, Tom Lane wrote:
>> I've been saying from day one that pushing the query-hashing code into the
>> core was a bad idea, and I think this patch perfectly illustrates why.

> +1.

> Let me suggest, that the core should allow an extension at least to
> detect such interference between extensions. Maybe hook could be
> replaced with callback to allow extension see an queryid with underlying
> generation logic what it expects.

I feel like we need to get away from the idea that there is just
one query hash, and somehow let different extensions attach
differently-calculated hashes to a query. I don't have any immediate
ideas about how to do that in a reasonably inexpensive way.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2022-01-05 05:15:06 Re: Emit "checkpoint skipped because system is idle" message at LOG level if log_checkpoints is set
Previous Message Alexander Lakhin 2022-01-05 05:00:00 Re: Index-only scan for btree_gist turns bpchar to char