mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Remove the query_id_squash_values GUC
Commit 62d712ecfd
introduced the capability to calculate the same
queryId for queries with different lengths of constants in a list for an
IN clause. This behavior was originally enabled with a GUC
query_id_squash_values. After a discussion about the value of such a
GUC, it was decided to back out of the use of a GUC and make the
squashing behavior the only available option.
Author: Sami Imseih <samimseih@gmail.com>
Discussion: https://postgr.es/m/Z-LZyygkkNyA8-kR@msg.df7cb.de
Discussion: https://postgr.es/m/CA+q6zcVTK-3C-8NWV1oY2NZrvtnMCDqnyYYyk1T7WMUG65MeOQ@mail.gmail.com
This commit is contained in:
@ -8726,36 +8726,6 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="guc-query-id-squash-values" xreflabel="query_id_squash_values">
|
||||
<term><varname>query_id_squash_values</varname> (<type>bool</type>)
|
||||
<indexterm>
|
||||
<primary><varname>query_id_squash_values</varname> configuration parameter</primary>
|
||||
</indexterm>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies how a list of constants (e.g., for an <literal>IN</literal>
|
||||
clause) contributes to the query identifier computation.
|
||||
Normally, every element of such a list contributes to the query
|
||||
identifier separately, which means that two queries that only differ
|
||||
in the number of elements in such a list would get different query
|
||||
identifiers.
|
||||
If this parameter is on, a list of constants will not contribute
|
||||
to the query identifier. This means that two queries whose only
|
||||
difference is the number of constants in such a list are going to get the
|
||||
same query identifier.
|
||||
</para>
|
||||
<para>
|
||||
Only constants are affected; bind parameters do not benefit from this
|
||||
functionality. The default value is <literal>off</literal>.
|
||||
</para>
|
||||
<para>
|
||||
This parameter also affects how <xref linkend="pgstatstatements"/>
|
||||
generates normalized query texts.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="guc-log-statement-stats">
|
||||
<term><varname>log_statement_stats</varname> (<type>boolean</type>)
|
||||
<indexterm>
|
||||
|
@ -632,13 +632,11 @@
|
||||
In some cases, queries with visibly different texts might get merged into a
|
||||
single <structname>pg_stat_statements</structname> entry; as explained above,
|
||||
this is expected to happen for semantically equivalent queries.
|
||||
In addition, if <varname>query_id_squash_values</varname> is enabled
|
||||
and the only difference between queries is the number of elements in a list
|
||||
of constants, the list will get squashed down to a single element but shown
|
||||
In addition, if the only difference between queries is the number of elements
|
||||
in a list of constants, the list will get squashed down to a single element but shown
|
||||
with a commented-out list indicator:
|
||||
|
||||
<screen>
|
||||
=# SET query_id_squash_values = on;
|
||||
=# SELECT pg_stat_statements_reset();
|
||||
=# SELECT * FROM test WHERE a IN (1, 2, 3, 4, 5, 6, 7);
|
||||
=# SELECT * FROM test WHERE a IN (1, 2, 3, 4, 5, 6, 7, 8);
|
||||
|
Reference in New Issue
Block a user