|From:||Julien Rouhaud <rjuju123(at)gmail(dot)com>|
|Subject:||Some oversights in query_id calculation|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
While doing some sanity checks on the regression tests, I found some queries
that are semantically different but end up with identical query_id.
Two are an old issues:
- the "ONLY" in FROM [ONLY] isn't hashed
- the agglevelsup field in GROUPING isn't hashed
Another one was introduced in pg13 with the WITH TIES not being hashed.
The last one new in pg14: the "DISTINCT" in "GROUP BY [DISTINCT]" isn't hash.
I'm attaching a patch that fixes those, with regression tests to reproduce each
There are also 2 additional debatable cases on whether this is a semantic
difference or not:
- aliases aren't hashed. That's usually not a problem, except when you use
row_to_json(), since you'll get different keys
- the NAME in XmlExpr (eg: xmlpi(NAME foo,...)) isn't hashed, so you generate
|Next Message||Julien Rouhaud||2021-04-25 08:22:51||Re: compute_query_id and pg_stat_statements|
|Previous Message||Yura Sokolov||2021-04-25 06:48:52||Re: Use simplehash.h instead of dynahash in SMgr|