model-writtenrun 7569 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Julien Rouhaud opened the thread with an example where pg_stat_statements.track = all counted a five-second operation twice when summing execution times, and proposed distinguishing top-level entries with a new hash-key field #1.
- Nikolay Samokhvalov supported distinguishing top-level statements, while Julien explained that identical queries executed both directly and inside other statements would require separate entries #2 #3 #9.
- Fujii Masao proposed separate top-level and nested execution counts, but Julien warned that deriving resource usage from those counts would be approximate, and Sergei Kornilov considered split counters less convenient and more error-prone #4 #5 #11.
- Pascal proposed parent-statement identifiers and deeper nesting information; Sergei warned about excessive entries, and Julien suggested plpgsql_check profiling for locating statements within functions #6 #7 #12.
- Julien implemented the emerging consensus with a boolean toplevel key, padding initialization, output column, tests, and documentation; Sergei caught the missing statistics-file format bump, which Julien added before rebasing after a conflicting upstream change #14 #15 #16 #17.
- Masahiro Ikeda reviewed and tested the rebased patch, including make check-world and extension upgrades; discussion found no compelling need for selective top-level resets or nesting-depth counters, and Masahiro withdrew an unreproducible concern about pre-upgrade entries having false flags #18 #19 #20.
- Magnus Hagander requested retaining the hash-padding explanation and questioned storing duplicate query texts; Julien explained that deduplication would complicate entry management and garbage collection, leading Magnus to request evidence about how common duplicates were #22 #24 #25 #26 #27.
- Julien obtained preproduction measurements showing about 35 duplicated statements among 9,500 entries, supporting acceptance of duplicate query texts instead of adding deduplication overhead #28.
- Magnus accepted that tradeoff and committed the rebased feature from #17 with light comment and formatting edits as 6b4d23feef, announcing the landing in #29.
- After the landing, Julien noticed that extension version 1.9 was already new for PostgreSQL 14 and supplied a follow-up merging the unnecessary 1.10 increment into 1.9 #30.
- Magnus applied that follow-up unchanged as 5844c23dc5 and confirmed it was pushed; Julien's final thanks closed the thread with both changes landed and no outstanding patch #31 #32.