Re: BUG #17668: Query normalization generates multiple queryId:s for calls to the same procedure

Поиск
Список
Период
Сортировка
От Julien Rouhaud
Тема Re: BUG #17668: Query normalization generates multiple queryId:s for calls to the same procedure
Дата
Msg-id 20221027160834.uxhmt473grlpfv5x@jrouhaud
обсуждение исходный текст
Ответ на BUG #17668: Query normalization generates multiple queryId:s for calls to the same procedure  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #17668: Query normalization generates multiple queryId:s for calls to the same procedure
Список pgsql-bugs
Hi,

On Thu, Oct 27, 2022 at 01:49:18PM +0000, PG Bug reporting form wrote:
>
> postgres=# select calls,userid,dbid,queryid,query from
> public.pg_stat_statements where query like 'select test%';
>  calls | userid | dbid  |       queryid        |      query
> -------+--------+-------+----------------------+-----------------
>      1 |     10 | 13757 | -8729651821477628722 | select test($1)
>      1 |     10 | 13757 |  1452143938866253601 | select test($1)
> (2 rows)
>
> So given the above 2 calls for the same function, there are 2 different
> queryIds generated, seemingly based on the fact that in the first case the
> parameter can be cast to integer, and in the second case it can not.
>
> I would have expected both calls to be normalized and fingerprinted to one
> and the same queryId.

Agreed, and that's actually a known problem that is currently being worked on.
You can look at
https://www.postgresql.org/message-id/flat/36e5bffe-e989-194f-85c8-06e7bc88e6f7%40amazon.com
for details about the discussion and in-progress fix.



В списке pgsql-bugs по дате отправления:

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17668: Query normalization generates multiple queryId:s for calls to the same procedure
Следующее
От: Παναγιώτης Ρουσάλης
Дата:
Сообщение: PostrgreSQL 15 installation