Re: Normalization of utility queries in pg_stat_statements
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: "Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-02-20T02:32:23Z
Lists: pgsql-hackers
On Fri, Feb 17, 2023 at 09:36:27AM +0100, Drouvot, Bertrand wrote: > On 2/17/23 3:35 AM, Michael Paquier wrote: >> 0001 looks quite committable at this stage, and that's independent on >> the rest. At the end this patch creates four new test files that are >> extended in the next patches: utility, planning, track and cleanup. > > Thanks! LGTM. Thanks. I have applied the set of regression tests in 0001 and 0002. Note that I have changed the order of the attributes when querying pg_stat_statements, to make easier to follow the diffs generated by the normalization. The unaligned mode would be another option, but it makes not much sense as long as there are no more than two fields with variable lengths. Some extra notes about that: - Should the test for the validation WAL generation metrics be moved out? I am not sure that it makes much sense to separate it as it has a short purpose. - Same issue with user activity, which creates a few roles and makes sure that their activity is tracked? We don't look at the userid in this case, which does not make much sense to me. - Same issue with locking clauses, worth a file of their own? The main file is still named pg_stat_statements.sql, perhaps it should be renamed to something more generic, like general.sql? Or perhaps we could just split the main file with a select.sql (with locking clauses) and a dml.sql? >> I am wondering if others have an opinion to share about that, but, >> yes, 0004 seems enough to begin with. We could always study more >> normalization areas in future releases, taking it slowly. > > Agree. These last ones are staying around for a few more weeks, until the middle of the next CF, I guess. After all this is done, the final changes are very short, showing the effects of the normalization, as of: 6 files changed, 45 insertions(+), 35 deletions(-) -- 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