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

From Michael Paquier
Subject Re: IDEA: pg_stat_statements tracking utility statements by tag?
Date
Msg-id 20200730015434.GC22023@paquier.xyz
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, Jul 29, 2020 at 06:35:41PM +0200, Julien Rouhaud wrote:
> There's at least PREPARE TRANSACTION / COMMIT PREPARED / ROLLBACK
> PREPARED that should be normalized too.  I also don't think that we
> really want to have different entries for begin / Begin / BEGIN /
> bEgin and similar for many other commands, as the hash is computed
> based on the query text.

Hmm.  Do we really want to those commands fully normalized all the
time?  There may be applications that care about the stats of some
commands that are for example prefixed the same way and would prefer
group those things together.  By fully normalizing those commands all
the time, we would lose this option.

An example.  The ODBC driver uses its own grammar for internal
savepoint names, aka _EXEC_SVP_%p.  If you mix that with a second
application that has its own naming policy for savepoints it would not
be possible anymore to make the difference in the stats between what
one or the other do.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: PG 13 release notes, first draft
Next
From: Peter Geoghegan
Date:
Subject: Re: PG 13 release notes, first draft