Re: IDEA: pg_stat_statements tracking utility statements by tag? - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: IDEA: pg_stat_statements tracking utility statements by tag?
Date
Msg-id CADWG95tz1gHFio3MS7RGcb1ftOuB3JdiFGWuORVnGdXce-j=Wg@mail.gmail.com
Whole thread Raw
In response to Re: IDEA: pg_stat_statements tracking utility statements by tag?  (Julien Rouhaud <rjuju123@gmail.com>)
Responses Re: IDEA: pg_stat_statements tracking utility statements by tag?  (Julien Rouhaud <rjuju123@gmail.com>)
List pgsql-hackers

On Wed, 29 Jul 2020 at 15:40, Julien Rouhaud <rjuju123@gmail.com> wrote:
On Wed, Jul 29, 2020 at 2:42 PM Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
>
>
> Or, we should extend the existing query normalization to handle also DDL?

+1, introducing DDL normalization seems like a better way to go in the
long run.  Defining what should and shouldn't be normalized can be
tricky though.

In principle, the only thing that really needs to be normalised is SAVEPOINT/CURSOR names which are essentially random strings which have no effect on the result. Most other stuff is material to the query.

That said, I think "aggregate by tag" has value all by itself. Being able to collapse all CREATE TABLES into a single line can be useful in some situations.

Ideally the results of FETCH "cursor" should be combined with the DECLARE, but I really don't know how to go about that.

Have a nice day,
--

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Nicer error when connecting to standby with hot_standby=off
Next
From: Robert Haas
Date:
Subject: Re: refactoring basebackup.c