Re: Bug in pg_stat_statements

Álvaro Herrera <alvherre@kurilemu.de>

From: Álvaro Herrera <alvherre@kurilemu.de>
To: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: Sami Imseih <samimseih@gmail.com>, Konstantin Knizhnik <knizhnik@garret.ru>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-10-28T17:13:30Z
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 →
  1. pg_stat_statements: Fix handling of duplicate constant locations

Attachments

On 2025-Oct-26, Dmitry Dolgov wrote:

> > On Fri, Oct 24, 2025 at 07:04:59PM -0500, Sami Imseih wrote:
> > v4 corrects some code comments.
> 
> The fix in the first patch looks good, thanks.

Yeah, I think this general idea is sensible.  However, I think we should
take it one step further and just remove last_loc entirely.  I think
this makes the code a bit clearer.  How about the attached?

Regarding 0002, as I said on my reply to Michael I think this is a good
idea on principle, but I suggest to discuss that in a separate thread.
I would seek routine names that match the current ones in queryjumble.h
a little better though.

> P.S. Adding Álvaro as a commiter of the affected feature, maybe he will
> help us to apply the fix.

Thanks for doing that, I'd have not noticed the thread otherwise.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"Pero la cosa no es muy grave ..."     (le petit Nicolas -- René Goscinny)