postgres/contrib
Álvaro Herrera 62d712ecfd
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.

Author: Dmitry Dolgov <9erthalion6@gmail.com>
Reviewed-by: Sergey Dudoladov (mysterious, off-list)
Reviewed-by: David Geier <geidav.pg@gmail.com>
Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org>
Reviewed-by: Sami Imseih <samimseih@gmail.com>
Reviewed-by: Sutou Kouhei <kou@clear-code.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Marcos Pegoraro <marcos@f10.com.br>
Reviewed-by: Julien Rouhaud <rjuju123@gmail.com>
Reviewed-by: Zhihong Yu <zyu@yugabyte.com>
Tested-by: Yasuo Honda <yasuo.honda@gmail.com>
Tested-by: Sergei Kornilov <sk@zsrv.org>
Tested-by: Maciek Sakrejda <m.sakrejda@gmail.com>
Tested-by: Chengxi Sun <sunchengxi@highgo.com>
Tested-by: Jakub Wartak <jakub.wartak@enterprisedb.com>
Discussion: https://postgr.es/m/CA+q6zcWtUbT_Sxj0V6HY6EZ89uv5wuG5aefpe_9n0Jr3VwntFg@mail.gmail.com
2025-03-18 18:56:11 +01:00
..
amcheck nbtree: Make BTMaxItemSize into object-like macro. 2025-03-11 10:35:56 -04:00
auth_delay Update copyright for 2025 2025-01-01 11:21:55 -05:00
auto_explain Make it possible for loadable modules to add EXPLAIN options. 2025-03-18 08:41:12 -04:00
basebackup_to_shell Fix inconsistent quoting for some options in TAP tests 2025-03-17 14:07:12 +09:00
basic_archive Update copyright for 2025 2025-01-01 11:21:55 -05:00
bloom Show index search count in EXPLAIN ANALYZE, take 2. 2025-03-11 09:20:50 -04:00
bool_plperl Update copyright for 2025 2025-01-01 11:21:55 -05:00
btree_gin Update copyright for 2025 2025-01-01 11:21:55 -05:00
btree_gist Drop opcintype from index AM strategy translation API 2025-02-21 09:07:16 +01:00
citext Update copyright for 2025 2025-01-01 11:21:55 -05:00
cube Update copyright for 2025 2025-01-01 11:21:55 -05:00
dblink pg_noreturn to replace pg_attribute_noreturn() 2025-03-13 12:37:26 +01:00
dict_int Update copyright for 2025 2025-01-01 11:21:55 -05:00
dict_xsyn Update copyright for 2025 2025-01-01 11:21:55 -05:00
earthdistance Update copyright for 2025 2025-01-01 11:21:55 -05:00
file_fdw Make it possible for loadable modules to add EXPLAIN options. 2025-03-18 08:41:12 -04:00
fuzzystrmatch Remove unnecessary (char *) casts [string] 2025-02-12 08:49:18 +01:00
hstore Update copyright for 2025 2025-01-01 11:21:55 -05:00
hstore_plperl Use @extschema:name@ notation in contrib transform modules. 2025-01-09 15:16:56 -05:00
hstore_plpython Use @extschema:name@ notation in contrib transform modules. 2025-01-09 15:16:56 -05:00
intagg Update copyright for 2025 2025-01-01 11:21:55 -05:00
intarray Specialize intarray sorting 2025-02-18 11:04:55 +07:00
isn contrib/isn: Make weak mode a GUC setting, and fix related functions. 2025-03-16 13:45:48 -04:00
jsonb_plperl Update copyright for 2025 2025-01-01 11:21:55 -05:00
jsonb_plpython Update copyright for 2025 2025-01-01 11:21:55 -05:00
lo Repair incorrect handling of AfterTriggerSharedData.ats_modifiedcols. 2025-01-22 11:58:20 -05:00
ltree Remove various unnecessary (char *) casts 2025-02-20 19:49:27 +01:00
ltree_plpython Use @extschema:name@ notation in contrib transform modules. 2025-01-09 15:16:56 -05:00
oid2name Update copyright for 2025 2025-01-01 11:21:55 -05:00
pageinspect Remove unnecessary (char *) casts [checksum] 2025-02-12 08:59:48 +01:00
passwordcheck Add passwordcheck.min_password_length. 2025-01-07 15:06:40 -06:00
pg_buffercache Update copyright for 2025 2025-01-01 11:21:55 -05:00
pg_freespacemap pg_freespacemap: Fix declaration of pg_freespace(regclass) 2025-01-08 13:16:43 +09:00
pg_logicalinspect Fix indentation issue 2025-03-13 12:41:44 +13:00
pg_prewarm Update copyright for 2025 2025-01-01 11:21:55 -05:00
pg_stat_statements Introduce squashing of constant lists in query jumbling 2025-03-18 18:56:11 +01:00
pg_surgery Update copyright for 2025 2025-01-01 11:21:55 -05:00
pg_trgm Fix an issue with index scan using pg_trgm due to char signedness on different architectures. 2025-02-21 10:27:39 -08:00
pg_visibility Remove unnecessary (char *) casts [xlog] 2025-02-13 10:57:07 +01:00
pg_walinspect Update copyright for 2025 2025-01-01 11:21:55 -05:00
pgcrypto pg_noreturn to replace pg_attribute_noreturn() 2025-03-13 12:37:26 +01:00
pgrowlocks Update copyright for 2025 2025-01-01 11:21:55 -05:00
pgstattuple Update copyright for 2025 2025-01-01 11:21:55 -05:00
postgres_fdw Make it possible for loadable modules to add EXPLAIN options. 2025-03-18 08:41:12 -04:00
seg Update copyright for 2025 2025-01-01 11:21:55 -05:00
sepgsql Apply more consistent style for command options in TAP tests 2025-03-17 12:42:23 +09:00
spi Update copyright for 2025 2025-01-01 11:21:55 -05:00
sslinfo Remove support for linking with libeay32 and ssleay32 2025-02-06 20:26:46 +01:00
start-scripts Remove gratuitous references to postmaster program 2023-01-26 10:48:32 +01:00
tablefunc Update copyright for 2025 2025-01-01 11:21:55 -05:00
tcn Update copyright for 2025 2025-01-01 11:21:55 -05:00
test_decoding Skip logical decoding of already-aborted transactions. 2025-02-12 16:31:34 -08:00
tsm_system_rows Update copyright for 2025 2025-01-01 11:21:55 -05:00
tsm_system_time Update copyright for 2025 2025-01-01 11:21:55 -05:00
unaccent Update copyright for 2025 2025-01-01 11:21:55 -05:00
uuid-ossp Update copyright for 2025 2025-01-01 11:21:55 -05:00
vacuumlo Update copyright for 2025 2025-01-01 11:21:55 -05:00
xml2 Remove unnecessary (char *) casts [mem] 2025-02-12 08:50:13 +01:00
contrib-global.mk Respect TEMP_CONFIG when pg_regress_check and friends are called 2016-02-27 12:28:21 -05:00
Makefile Add contrib/pg_logicalinspect. 2024-10-14 17:22:02 -07:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
README

The PostgreSQL contrib tree
---------------------------

This subtree contains porting tools, analysis utilities, and plug-in
features that are not part of the core PostgreSQL system, mainly
because they address a limited audience or are too experimental to be
part of the main source tree.  This does not preclude their
usefulness.

User documentation for each module appears in the main SGML
documentation.

When building from the source distribution, these modules are not
built automatically, unless you build the "world" target.  You can
also build and install them all by running "make all" and "make
install" in this directory; or to build and install just one selected
module, do the same in that module's subdirectory.

Some directories supply new user-defined functions, operators, or
types.  To make use of one of these modules, after you have installed
the code you need to register the new SQL objects in the database
system by executing a CREATE EXTENSION command.  In a fresh database,
you can simply do

    CREATE EXTENSION module_name;

See the PostgreSQL documentation for more information about this
procedure.