model-writtenrun 2003 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Mar - Apr 2025 · 4 entries
- Sami Imseih proposed cumulative generic_plan_calls and custom_plan_calls counters in pg_stat_statements because pg_prepared_statements exposes only session-local information, initially deriving plan type from CachedPlan status in #1.
- Greg Sabino Mullane requested simpler tests and explicit enum comparisons in #2, and Sami incorporated those changes along with Ilia Evdokimov's redundant-null-check correction across #3, #4, and #6.
- EXPLAIN output was left for possible follow-up, while database-wide counters attracted little support; Ilia later suggested pg_overexplain as a possible home for plan-type display, and Sami agreed in #10 and #11.
- After an April rebase in #9, an upstream revert removed the CachedPlan plumbing on which the patch depended, so Sami restored that plumbing explicitly, simplified the plan states, and added EXPLAIN coverage in #12 and #13.
May - Jul 2025 · 14 entries
- Nikolay Samokhvalov reported successful testing and identified initialization, documentation, and duplicate-column issues in #14; subsequent revisions addressed these and kept the new counters before the timestamp columns, with Ilia checking documentation consistency through #20.
- The June rebase in #21 adjusted expected results after another upstream revert, and Michael Paquier's review in #22 then challenged the layering implications of carrying CachedPlan inside QueryDesc.
- Andrei Lepikhov advocated exposing CachedPlanSource to enable broader extension feedback mechanisms in #23 and #27, while Sami explored alternatives that would avoid extra pg_stat_statements storage calls and their overhead in #24 and #30.
- Sami first replaced the retained pointer with a copied enum in QueryDesc in #30, then moved tracking into EState booleans in #32, an approach Michael initially supported in #33.
- Andrei argued that generic versus custom is a property of the plan rather than executor state in #37, leading Sami to place CachedPlanType in PlannedStmt and set it in GetCachedPlan in #39.
- Michael endorsed a simple plan-type field while rejecting cross-context pointers on lifetime grounds in #42, then proposed separating backend infrastructure from the extension in #44.
- Michael extracted the backend portion of #39 into 719dcf3c42, adjusting enum placement, naming, and comments, and posted the remaining pg_stat_statements patch in #45.
- After that landing, Tom Lane raised circular-reference concerns and suggested plan-cache hooks in #47 and #49, while Sami and Michael defended carrying a simple value to ExecutorEnd to avoid extra storage work in #48 and #52.
- Michael suggested broadening the field into a plan-origin concept in #52, and Tom proposed distinguishing user-submitted and internally generated plans in #55, prompting Michael's four-category follow-up patch in #57.
- Andrei proposed extensible metadata on Query and PlannedStmt in #58, but Michael and Sami kept this thread focused on plan counters and deferred broader infrastructure to follow-up discussion in #59 and #61.
- Sami combined the origin patch with the remaining counters and added an unset origin for callers without a PlannedStmt in #63; Michael and Andrei preferred UNKNOWN, which Sami adopted while restoring the complete counter patch in #66.
- The first patch of #66 landed unchanged as e125e36002, crediting Michael as author and Sami as co-author for the expanded PlannedStmtOrigin categories.
- The second patch of #66 landed as 3357471cf9, adding the counters and extension version 1.13 with Michael's file-header, documentation, upgrade-test, and regression-test corrections described in #70.
- By the final acknowledgment in #73, all submitted functionality had landed; Andrei's remaining questions concerned the meaning of plan origin and broader extension metadata, discussed in #71 and #72, rather than an outstanding patch in this series.