From: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
---|---|
To: | marcus(dot)kempe(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #17668: Query normalization generates multiple queryId:s for calls to the same procedure |
Date: | 2022-10-27 16:08:34 |
Message-ID: | 20221027160834.uxhmt473grlpfv5x@jrouhaud |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Παναγιώτης Ρουσάλης | 2022-10-27 18:02:09 | PostrgreSQL 15 installation |
Previous Message | PG Bug reporting form | 2022-10-27 13:49:18 | BUG #17668: Query normalization generates multiple queryId:s for calls to the same procedure |