Re: Squash constant lists in query jumbling by default

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Christoph Berg <myon@debian.org>
Cc: pgsql-hackers@lists.postgresql.org, Álvaro Herrera <alvherre@alvh.no-ip.org>, Sami Imseih <samimseih@gmail.com>, Michael Paquier <michael@paquier.xyz>, Julien Rouhaud <rjuju123@gmail.com>
Date: 2025-03-25T16:53:13Z
Lists: pgsql-hackers
Christoph Berg <myon@debian.org> writes:
> 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.

To clarify that last bit: if some clients run with the GUC on and some
with it off, you have a mess.  Even statements that are completely
identical will have different query IDs under the two settings.

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.

			regards, tom lane



Commits

  1. Remove the query_id_squash_values GUC

  2. Introduce squashing of constant lists in query jumbling