From: | Christoph Berg <myon(at)debian(dot)org> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Cc: | Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Sami Imseih <samimseih(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Julien Rouhaud <rjuju123(at)gmail(dot)com> |
Subject: | Squash constant lists in query jumbling by default |
Date: | 2025-03-25 16:28:59 |
Message-ID: | Z-LZyygkkNyA8-kR@msg.df7cb.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
Re: Álvaro Herrera
> Introduce squashing of constant lists in query jumbling
>
> pg_stat_statements produces multiple entries for queries like
> SELECT something FROM table WHERE col IN (1, 2, 3, ...)
>
> depending on the number of parameters, because every element of
> ArrayExpr is individually jumbled. Most of the time that's undesirable,
> especially if the list becomes too large.
>
> Fix this by introducing a new GUC query_id_squash_values which modifies
> the node jumbling code to only consider the first and last element of a
> list of constants, rather than each list element individually. This
> affects both the query_id generated by query jumbling, as well as
> pg_stat_statements query normalization so that it suppresses printing of
> the individual elements of such a list.
>
> The default value is off, meaning the previous behavior is maintained.
The "jumble names of temp tables" thread was briefly touching this [1],
I'm starting a new thread since the others are already very long.
Two points were made:
1) this should be on by default
2) there should be no GUC for it.
For 1), Sami said "Why would anyone not want to squash the IN list?"
to which I can only agree. Michael agreed as well, that's already +3.
For 2), Tom said that configurability is 1) often much less useful
than originally planned, and 2) tools have to cope with both settings
anyway, making implementing them harder. Plus, switching at run-time
makes the result even less predictable.
So, I would propose that we drop the GUC and make it the default.
Opinions?
Christoph
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2025-03-25 16:29:26 | pgsql: pg_basebackup: Add missing PQclear in error path |
Previous Message | Peter Eisentraut | 2025-03-25 16:08:11 | pgsql: refactor: Pass relation OID instead of Relation to createForeign |
From | Date | Subject | |
---|---|---|---|
Next Message | Nikolay Shaplov | 2025-03-25 16:35:23 | Re: vacuum_truncate configuration parameter and isset_offset |
Previous Message | Noah Misch | 2025-03-25 16:15:43 | Re: AIO v2.5 |