- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit62d712e
committed
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 ofArrayExpr 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 modifiesthe node jumbling code to only consider the first and last element of alist of constants, rather than each list element individually. Thisaffects both the query_id generated by query jumbling, as well aspg_stat_statements query normalization so that it suppresses printing ofthe 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.com1 parent247ce06 commit62d712e
File tree
15 files changed
+945
-22
lines changed- contrib/pg_stat_statements
- expected
- sql
- doc/src/sgml
- src
- backend
- nodes
- postmaster
- utils/misc
- include/nodes
15 files changed
+945
-22
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
23 |
| - | |
| 23 | + | |
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
|
0 commit comments
Comments
(0)