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-03-03T00:37:27Z
Lists: pgsql-hackers

Attachments

On Thu, Mar 02, 2023 at 08:12:24AM +0100, Drouvot, Bertrand wrote:
> Applying 0001 produces:
> 
> Applying: Split more regression tests of pg_stat_statements
> .git/rebase-apply/patch:1735: new blank line at EOF.
> +
> .git/rebase-apply/patch:2264: new blank line at EOF.
> +
> warning: 2 lines add whitespace errors.

Indeed, removed.

> What about removing those comments?

Removing these two as well.

> Except from the Nits above, 0001 LGTM.

Thanks for double-checking, applied 0001 to finish this part of the
work.  I am attaching the remaining bits as of the attached, combined
into a single patch.  I am going to look at it again at the beginning
of next week and potentially apply it so as the normalization reflects
to the reports of pg_stat_statements.
--
Michael

Commits

  1. Reflect normalization of query strings for utilities in pg_stat_statements

  2. Refine query jumbling handling for CallStmt

  3. Ignore IntoClause.viewQuery in query jumbling

  4. Improve cleanup phases in regression tests of pg_stat_statements

  5. Refactor more the regression tests of pg_stat_statements

  6. doc: Update pg_stat_statements about query ID calculation of utilities

  7. Expand regression tests of pg_stat_statements for utility queries

  8. Refactor tests of pg_stat_statements for planning, utility and level tracking