On Mon, Aug 31, 2026 at 03:07:47PM +0800, Chao Li wrote:
> Based on this understanding, I made a fix that resets existing
> entries back to the sticky state rather than deleting them. This
> preserves the normalized query text for cached prepared
> statements. If a query with the same query ID is parsed again later,
> the sticky entry is updated with the newly normalized query
> text. I’m not very familiar with the history and design
> considerations around pg_stat_statements_reset(), so I don’t have
> full confidence that retaining the entries is the intended approach,
> so comments are welcome.

I doubt that this is worth complicating the code of PGSS for.
pg_stat_statements_reset() is used, sure, but the case of a prepared
statement reusing a non-normalized query post-reset feels too edgy for
me to care about.   Let's keep the code simpler.
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to