Re: Bug in pg_stat_statements
Sami Imseih <samimseih@gmail.com>
From: Sami Imseih <samimseih@gmail.com>
To: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: Konstantin Knizhnik <knizhnik@garret.ru>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Álvaro Herrera <alvherre@kurilemu.de>
Date: 2025-10-27T19:34:50Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
pg_stat_statements: Fix handling of duplicate constant locations
- b1635c166698 18.1 landed
- 16edc1b94fc2 19 (unreleased) landed
Thanks for reviewing! >Not so sure about the > refactoring in the second patch -- generate_normalized_query is being > used only in one place, in pg_stat_statements, moving it out somewhere > else without having other clients seems to be questionable to me. The excellent question raised earlier is whether the fix should be applied in pg_stat_statements.c or queryjumblefuncs.c. To me, this suggests that pg_stat_statements, as an extension, is dealing with code it should not be responsible for. generate_normalized_query could be used by other extensions that have normalization needs; it’s generic and needs to handle squashing, which is a jumble specific detail. Therefore, I think both fill_in_constant_lengths and generate_normalized_query should be moved. We can certainly start a new thread (0002) if more discussion is needed. -- Sami Imseih Amazon Web Services (AWS)