Re: Squash constant lists in query jumbling by default

Dmitry Dolgov <9erthalion6@gmail.com>

From: Dmitry Dolgov <9erthalion6@gmail.com>
To: Álvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Christoph Berg <myon@debian.org>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>, Sami Imseih <samimseih@gmail.com>, Michael Paquier <michael@paquier.xyz>, Julien Rouhaud <rjuju123@gmail.com>
Date: 2025-03-25T20:05:44Z
Lists: pgsql-hackers
On Tue, Mar 25, 2025, 7:40 PM Dmitry Dolgov <9erthalion6@gmail.com> wrote:

>
>>> On Tue, Mar 25, 2025, 6:28 PM Álvaro Herrera <alvherre@alvh.no-ip.org>
> wrote:
>
> On 2025-Mar-25, Tom Lane wrote:
>
> > If this GUC sticks around, it should be at least PGC_SUSET (on
>
> > the analogy of compute_query_id) to make it harder to break
>
> > pg_stat_statements that way.
>
>
> I have no problem making it superuser-only, and I can see making "on" be
>
> the default.  I am not opposed to removing it completely either, if we
>
> really think that the current behavior is no longer useful for anybody.
>
>
> I'm in favor of removing the GUC of course, but if memory serves there
> were some folks in the patch discussion thread, who claimed they would
> need to be able to keep non-squashed behavior. I don't recall if there were
> particular arguments to support that, will try to find those messages
> again.
>

Nevermind, I've checked it out -- I think the case I had in mind [1] in fact
supports GUC removal:

> If anyone subtly changes jumbling logic when the extension is
active, the instance could get huge performance issues.

[1]:
https://www.postgresql.org/message-id/b8721722-a73e-0ee9-6513-425e9c88d92f%40postgrespro.ru

>

Commits

  1. Remove the query_id_squash_values GUC

  2. Introduce squashing of constant lists in query jumbling