model-writtenrun 7081 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Sami Imseih proposed extracting infrastructure from Lukas Fittl's plan-statistics work so extensions could store a 64-bit plan identifier in PlannedStmt and PgBackendStatus before core settled on a plan-hashing algorithm #1.
- Bertrand Drouvot checked the structure-size cost and questioned whether setters were needed; Sami and Michael Paquier favored APIs with query-ID-like reporting and reset semantics, while treating Andrei Lepikhov's proposed private extension data as separate work #2 #3 #4 #5 #6 #7.
- Sami's initial submission implemented the backend infrastructure and separately exposed plan_id through pg_stat_get_activity, leaving EXPLAIN output, logging, and core identifier computation outside its scope #8.
- Ilia Evdokimov reported successful debugging with extensions, and Michael recommended landing only the backend infrastructure with clearer API comments; Sami's revision dropped SQL-level exposure, expanded comments, and separated plan-ID reporting from query-ID reporting during Execute #9 #11 #12.
- Michael supplied a revision that published the identifier directly after planning and moved bind-time reporting after portal definition to avoid a future error path between GetCachedPlan() and PortalDefineQuery(); Sami approved it #13 #14.
- Andrei raised conflicting extension semantics, load order, and examples where different query IDs could share a plan; Michael and Sami maintained that computation and coordination belonged to extensions, while core supplied common storage and lifecycle handling #16 #17 #18 #19 #22 #23.
- Michael committed the exact code from his final attachment as 2a0cd38da5, crediting Lukas and Sami as authors and leaving system-view exposure and core plan-ID computation for future work #13 #24.
- After the commit, Alena Rybakina suggested factoring the repeated statement-list loops into a helper or macro; Sami explained their consistency with existing query-ID handling and invited a separate cleanup patch, which does not appear in this thread #26 #27.
- Lukas then sought reusable core expression-jumbling facilities for plan-ID extensions, and Sami started a separate series exposing jumble-state initialization, node jumbling, and hash generation while leaving file renaming aside #25 #30.
- Sami and Lukas argued for exporting append routines and convenience macros to avoid duplicating core hashing code, while Michael proposed reusable node-code generation and Andrei suggested callbacks; Michael preferred further design work for PostgreSQL 19 rather than rushing the interface #31 #32 #33 #34 #35.
- Lukas revised and rebased the jumbling series, exporting AppendJumble* and value-oriented macros while removing public support for recording constant locations; Sami reviewed it and added an assertion checking location storage #37 #38 #39.
- While adapting pg_stat_plans, Lukas found that the assertion prevented legitimate expression jumbling without location recording and replaced it with a conditional return; near feature freeze, he also proposed a smaller DoJumble export, which Sami noted would require initialization support and would not itself jumble plan nodes #40 #41.
- At the thread's end, the plan-identifier infrastructure had landed, but the jumbling API remained uncommitted: Michael declined to rush it into PostgreSQL 18, opposed exporting AppendJumbleNN(), and favored further consideration of a smaller node-based interface #42.