Re: pg_stat_statements and "IN" conditions
vignesh C <vignesh21@gmail.com>
From: vignesh C <vignesh21@gmail.com>
To: Álvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Sami Imseih <samimseih@gmail.com>, Dmitry Dolgov <9erthalion6@gmail.com>, Julien Rouhaud <rjuju123@gmail.com>, Kirill Reshke <reshkekirill@gmail.com>, Sergei Kornilov <sk@zsrv.org>, yasuo.honda@gmail.com, tgl@sss.pgh.pa.us, smithpb2250@gmail.com, michael@paquier.xyz, nathandbossart@gmail.com, stark.cfm@gmail.com, geidav.pg@gmail.com, marcos@f10.com.br, robertmhaas@gmail.com, david@pgmasters.net, pgsql-hackers@postgresql.org, pavel.trukhanov@gmail.com, Sutou Kouhei <kou@clear-code.com>
Date: 2025-03-17T06:37:44Z
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 Mon, 3 Mar 2025 at 17:26, Álvaro Herrera <alvherre@alvh.no-ip.org> wrote: > > On 2025-Feb-18, Sami Imseih wrote: > > > > It's not a question about whether it's possible to implement this, > > > but about whether it makes sense. In case of plain constants it's > > > straightforward -- they will not change anything meaningfully and > > > hence could be squashed from the query. Now for a function, that > > > might return different values for the same set of constant > > > arguments, it's much less obvious and omitting such expressions > > > might have unexpected consequences. > > > > query jumbling should not care about the behavior of the function. If > > we take a regular call to a volatile function, we will generate the > > same queryId for every call regardless of the input to the function. > > Why does the in-list case need to care about the volatility of the > > function? > > I feel quite insecure about this idea TBH. At least with immutable > functions I don't expect the system to behave wildly different than with > actual constants. What non-immutable functions do you have in mind that > would be useful to fold as if they were constants in the IN list in such > a query? > > In the meantime, here's v28 which is Dmitry's v27 plus pgindent. No > other changes. Dmitry, were you planning to submit a new version? I noticed that the feedback from Sami at [1] has not yet been addressed, I have changed the status to Waiting on Author, kindly address them and update the status to Needs review. [1] - https://www.postgresql.org/message-id/CAA5RZ0vt29Om%2BtKFOcUNhXV%2BkKpNnj0yj6OFho3-wngcMHWnAQ%40mail.gmail.com Regards, Vignesh