Re: IDEA: pg_stat_statements tracking utility statements by tag?

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Martijn van Oosterhout <kleptog(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: IDEA: pg_stat_statements tracking utility statements by tag?
Date: 2020-07-30 01:54:34
Message-ID: 20200730015434.GC22023@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2020-07-30 02:00:43 Re: PG 13 release notes, first draft
Previous Message Michael Paquier 2020-07-30 01:46:11 Re: [PATCH] Tab completion for VACUUM of partitioned tables