Re: Normalization of utility queries in pg_stat_statements
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: jian he <jian.universality@gmail.com>
Cc: "Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-08-17T23:31:37Z
Lists: pgsql-hackers
On Wed, Aug 16, 2023 at 05:11:47PM +0800, jian he wrote: > SELECT calls, toplevel, rows, query FROM pg_stat_statements ORDER BY > query COLLATE "C"; > returns: > calls | toplevel | rows | query > -------+----------+------+------------------------------------ > 1 | t | 0 | CALL ptest3($1) > 2 | f | 2 | INSERT INTO cp_test VALUES ($2, x) > 1 | t | 1 | SELECT pg_stat_statements_reset() > > here, the intermediate CALL part is optimized away. or should I expect > CALL ptest1($1) also in pg_stat_statements? I would have guessed that ptest1() being called as part of ptest3() should show up in the report if you use track = all, as all the nested queries of a function, even if it is pure SQL, ought to show up. Now note that ptest1() not showing up is not a new behavior, ~15 does the same thing by missing it. -- Michael
Commits
-
Reflect normalization of query strings for utilities in pg_stat_statements
- daa8365a9007 16.0 landed
-
Refine query jumbling handling for CallStmt
- a4e003338d18 16.0 landed
-
Ignore IntoClause.viewQuery in query jumbling
- d69cd3a2e29c 16.0 landed
-
Improve cleanup phases in regression tests of pg_stat_statements
- 9a714b9d6ec0 16.0 landed
-
Refactor more the regression tests of pg_stat_statements
- d0028e35a05a 16.0 landed
-
doc: Update pg_stat_statements about query ID calculation of utilities
- 6a88a058614b 16.0 landed
-
Expand regression tests of pg_stat_statements for utility queries
- de2aca288569 16.0 landed
-
Refactor tests of pg_stat_statements for planning, utility and level tracking
- e8dbdb15dbc8 16.0 landed