Re: pg_stat_statements and "IN" conditions
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: "Gregory Stark (as CFM)" <stark.cfm@gmail.com>, David Geier <geidav.pg@gmail.com>, Sergei Kornilov <sk@zsrv.org>, Michael Paquier <michael@paquier.xyz>, Alvaro Herrera <alvherre@alvh.no-ip.org>, Marcos Pegoraro <marcos@f10.com.br>, vignesh C <vignesh21@gmail.com>, Robert Haas <robertmhaas@gmail.com>, Zhihong Yu <zyu@yugabyte.com>, David Steele <david@pgmasters.net>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Pavel Trukhanov <pavel.trukhanov@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2023-07-04T04:46:11Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Introduce squashing of constant lists in query jumbling
- 62d712ecfd94 18.0 landed
-
Make documentation builds reproducible
- b0f0a9432d0b 17.0 cited
-
Include values of A_Const nodes in query jumbling
- 9ba37b2cb6a1 16.0 cited
-
Teach planner about more monotonic window functions
- 456fa635a909 16.0 cited
-
Split up guc.c for better build speed and ease of maintenance.
- 0a20ff54f5e6 16.0 cited
On Sun, Mar 19, 2023 at 01:27:34PM +0100, Dmitry Dolgov wrote: > + If this parameter is on, two queries with an array will get the same > + query identifier if the only difference between them is the number of > + constants, both numbers is of the same order of magnitude and greater or > + equal 10 (so the order of magnitude is greather than 1, it is not worth > + the efforts otherwise). IMHO this adds way too much complexity to something that most users would expect to be an on/off switch. If I understand Álvaro's suggestion [0] correctly, he's saying that in addition to allowing "on" and "off", it might be worth allowing something like "powers" to yield roughly the behavior described above. I don't think he's suggesting that this "powers" behavior should be the only available option. Also, it seems counterintuitive that queries with fewer than 10 constants are not merged. In the interest of moving this patch forward, I would suggest making it a simple on/off switch in 0002 and moving the "powers" functionality to a new 0003 patch. I think separating out the core part of this feature might help reviewers. As you can see, I got distracted by the complicated threshold logic and ended up focusing my first round of review there. [0] https://postgr.es/m/20230209172651.cfgrebpyyr72h7fv%40alvherre.pgsql -- Nathan Bossart Amazon Web Services: https://aws.amazon.com