Re: Normalization of utility queries in pg_stat_statements

2023-08-17 Thread Michael Paquier
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|

Re: Normalization of utility queries in pg_stat_statements

2023-08-16 Thread jian he
On Wed, Mar 8, 2023 at 2:19 PM Michael Paquier wrote: > > On Fri, Mar 03, 2023 at 09:37:27AM +0900, Michael Paquier wrote: > > 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. > >

Re: Normalization of utility queries in pg_stat_statements

2023-03-07 Thread Michael Paquier
On Fri, Mar 03, 2023 at 09:37:27AM +0900, Michael Paquier wrote: > 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. Doing so as a single patch was not feeling right as this actually

Re: Normalization of utility queries in pg_stat_statements

2023-03-06 Thread Michael Paquier
On Mon, Mar 06, 2023 at 03:50:55PM +0300, Andrei Zubkov wrote: > Those statements is not related to any WAL tests. It seems a little bit > incorrect to me. The intention is to have each file run in isolation, so this is incorrect as it stands. Thanks for the report! -- Michael signature.asc

Re: Normalization of utility queries in pg_stat_statements

2023-03-06 Thread Andrei Zubkov
Hi Michael! I'm rebasing a patch "Tracking statements entry timestamp in pg_stat_statements" for applying after this patch. I've noted that current tests are not quite independent one from another. There is two statements in the end of user_activity.sql test: DROP ROLE regress_stats_user1; DROP

Re: Normalization of utility queries in pg_stat_statements

2023-03-02 Thread Michael Paquier
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

Re: Normalization of utility queries in pg_stat_statements

2023-03-01 Thread Drouvot, Bertrand
Hi, On 3/1/23 5:47 AM, Michael Paquier wrote: On Mon, Feb 20, 2023 at 11:34:59AM +0900, Michael Paquier wrote: With the patches.. Attached is an updated patch set, where I have done more refactoring work for the regression tests of pg_stat_statements, splitting pg_stat_statments.sql into the

Re: Normalization of utility queries in pg_stat_statements

2023-02-28 Thread Michael Paquier
On Mon, Feb 20, 2023 at 11:34:59AM +0900, Michael Paquier wrote: > With the patches.. Attached is an updated patch set, where I have done more refactoring work for the regression tests of pg_stat_statements, splitting pg_stat_statments.sql into the following files: - user_activity.sql for the

Re: Normalization of utility queries in pg_stat_statements

2023-02-19 Thread Michael Paquier
On Mon, Feb 20, 2023 at 11:32:23AM +0900, Michael Paquier wrote: > 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

Re: Normalization of utility queries in pg_stat_statements

2023-02-19 Thread Michael Paquier
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:

Re: Normalization of utility queries in pg_stat_statements

2023-02-17 Thread Drouvot, Bertrand
Hi, On 2/17/23 3:35 AM, Michael Paquier wrote: On Thu, Feb 16, 2023 at 10:55:32AM +0100, Drouvot, Bertrand wrote: In the new pg_stat_statements.sql? That way pg_stat_statements.sql would always behave with default values for those (currently we are setting both of them as non default).

Re: Normalization of utility queries in pg_stat_statements

2023-02-16 Thread Drouvot, Bertrand
Hi, On 2/16/23 1:34 AM, Michael Paquier wrote: While wondering about this stuff about the last few days and discussing with bertrand, I have changed my mind on the point that there is no need to be that aggressive yet with the normalization of the A_Const nodes, because the query string

Re: Normalization of utility queries in pg_stat_statements

2023-02-15 Thread Michael Paquier
On Wed, Feb 08, 2023 at 12:05:24PM +0900, Michael Paquier wrote: > Thoughts and comments are welcome. 0001 and 0002 are useful on their > own to keep track of utilities that use Const and A_Const after going > through the query jumbling, even if an approach based on query string > or the

Normalization of utility queries in pg_stat_statements

2023-02-07 Thread Michael Paquier
Hi all, (Adding Bertrand in CC.) $subject is a follow-up of the automation of query jumbling for utilities and DDLs, and attached is a set of patches that apply normalization to DDL queries across the board, for all utilities. This relies on tracking the location of A_Const nodes while removing