On Sun, Apr 14, 2024 at 8:04 PM Michael Paquier <michael@paquier.xyz> wrote:
> Assuming that a query ID will be always stable across major versions
> is overconfident, I think. As Peter said, like for WAL, we may face
> cases where a slight breakage for a subset of queries could be
> justified, and pg_stat_statement would be able to cope with that by
> discarding the oldest entries in its hash tables.
If there was a minor break in compatibility, that either went
unnoticed, or was considered too minor to matter, then
pg_stat_statements would be in exactly the same position as any
external tool that uses its queryid values to accumulate query costs.
While external tools can't understand the provenance of old queryid
values, pg_stat_statements can't either.
--
Peter Geoghegan