model-writtenrun 7110 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Jun - Jul 2018 · 3 entries
- Kyotaro Horiguchi proposed replacing statistics files with dshash storage while retaining the UDP collector, aiming to remove the I/O bottleneck that limited additional statistics #1.
- Robert Haas objected to copying the entire shared hash into every backend #2, so Kyotaro changed to per-object cached reads and uncached vacuum reads #3; Tom Lane challenged the weaker snapshot semantics #5.
- Kyotaro prototyped bounded UNDO logging for consistent table statistics #7, but Robert Haas and Andres Freund argued the extra complexity was unjustified for already imperfect statistics #9 #16, and the next complete version omitted UNDO #17.
Sep 2018 - May 2019 · 8 entries
- Antonin Houska reviewed locking and proposed replacing UDP with a shared-memory queue #20, while Andres Freund argued that backends should update shared tables directly with conditional locks and retain unsuccessful updates locally #21; Kyotaro implemented that direction #23 and removed the collector process #25.
- Antonin Houska exposed unsafe stats-file writes from the postmaster signal handler and dshash scan races #26, and Tomas Vondra found uninitialized state with Valgrind #27; Kyotaro reorganized startup and shutdown, made the archiver an auxiliary process, and split backend status code out of pgstat #30 #31.
- Tomas Vondra required each series component to remain buildable #35 and benchmarked a 20% slowdown in statistics queries #38; Kyotaro reorganized the patches #36, retained compatibility definitions for extensions #39, and later eliminated the slowdown with negative caching and a minimum cache lifetime #49.
- Tomas Vondra supplied a Windows EXEC_BACKEND fix removing obsolete pgStatSock references #43, which Kyotaro folded into a refreshed series #48.
- Andres Freund rejected unrelated renames and redundant pending-statistics hashes #51 #54; Kyotaro simplified pending updates and per-database locking #56 #57, then removed the file-movement refactoring to shrink the patch #59.
- Arthur Zakirov found an autovacuum use-after-free #60 and missing archiver backend-type handling in TAP tests #63; Kyotaro fixed the cache lifetime and scan-lock bugs #62 and incorporated the remaining test fixes #68.
- Robert Haas ruled out using DSM or taking locks in the postmaster #64, forcing initialization and persistence into startup and ordinary backends #68; the work missed the PostgreSQL 12 deadline because the large and sensitive change was not ready #69.
- Kyotaro supplied broader benchmarks and reduced lock duration #74 #78, then maintained the series through repeated rebases until Tom Lane rebased and ran check-world in March 2020 #88.
Mar - Jun 2020 · 3 entries
- Alvaro Herrera and Julien Rouhaud questioned whether failed archive commands would crash the server #89 #98; Andres Freund explained that ordinary FATAL exits remain accepted for auxiliary processes #100, allowing the archiver conversion to proceed.
- Andres Freund and Thomas Munro challenged dshash scan deletion, unnecessary consistent-scan mode, frequent attach/detach cycles, and database-wide lock contention #101 #104 #106; Kyotaro replaced the nested database/table/function hashes with one typed-key hash pointing to separately allocated statistics and per-entry locks #109.
- Further cleanup moved archiver wakeups to latches and updated terminology #113 #114; SLRU statistics remained separately stored because critical-section updates could not safely allocate entries in the general statistics hash #115.
Sep 2020 - Apr 2021 · 10 entries
- After high-concurrency contention reports #123, Kyotaro prototyped a local pointer cache #125, then answered Andres's review by removing transaction snapshots, placing fixed statistics in ordinary shared memory, adding reference-counted cached pointers, and consolidating persistence into one file #129 #130.
- Kyotaro removed writer locks from fixed statistics, repaired flushing intervals, and integrated new WAL and replication-slot counters; subsequent revisions fixed dropped-entry reuse and reference cleanup #131 #135 #136 #139.
- Fujii Masao took up the independently useful auxiliary-archiver conversion, reviewing restart behavior and latch safety, while Andres proposed process-number based wakeups #144 #152 #156; Fujii's polished standalone version #170 landed with light edits as d75288fb27, and Kyotaro resent the remaining statistics work #177.
- Andres separated cumulative statistics from wait events, backend status, and progress reporting #171 #179; after Robert Haas's review #182, the wait-event extraction landed with light edits as a333476b92 and the backend-status/progress extraction landed with revised initialization and snapshot interfaces as e1025044cd.
- Andres found a reference-count race and reproduced use-after-free behavior, leading Kyotaro to move the reference increment before releasing the shared-hash lock #157 #186 #192.
- Andres substantially rebuilt the implementation around transactional statistics deletion, explicit reference ownership, per-kind callbacks, and selectable none/cache/snapshot consistency #195 #199; it missed PostgreSQL 14 because testing, performance validation, architectural review, and correctness work remained.
- Kyotaro reviewed the newly separated preparatory components #201, and the bgwriter/checkpointer split from #199 landed with small adjustments as 1bc8e7b099.
- The initialization prerequisite from #199 landed as ee3f8d3d3a, replacing scattered early calls with initialization in BaseInit and adding lifecycle assertions, using the startup restructuring developed in thread #44627.
- The shutdown prerequisites from #199 landed as the lightly edited parallel-worker shutdown fa91d4c91f and single-user ShutdownXLOG callback a1bb3d5dbe, followed by the extracted statistics shutdown-hook change fb2c5028e6, whose ordering prerequisites were also discussed in thread #44627 and thread #44631.
- The relation transaction-handling split and truncate/drop preparation from #199 subsequently landed as e1f958d759 and 6b9501660c, with light adjustments to the former and matching changes in the latter.
Jul - Oct 2021 · 1 entry
- After a partitioned-table blocker delayed further progress #206, Andres revived the uncommitted remainder in March 2022 #209 and split transactional deletion, tests, and individual fixed-statistics implementations into reviewable components #211.
Mar - Apr 2022 · 18 entries
- The formatting, relation/database reporting, and WAL reporting components of #211 landed unchanged as a3a75b982b, 89c546c294, and 78f9506b38.
- The relation-counting predicate and transaction-level helpers from #211 landed unchanged as 8363102009 and d4ba8b51c7, while bff258a273 took only the relation-initialization rename and left lazy association for the main implementation.
- The type-specific source-file split from #211 landed with naming and placement polishing as 13619598f1; Andres then posted the remainder #215, whose pgstat.[ch] reordering component landed with further movement-only cleanup as 315ae75e9b.
- Melanie Plageman supplied physical-replica cleanup and crash/corrupt-file tests #212 #214, subscription reset/drop tests #216, broader reset tests #218, and callback fixes #223; these contributions were incorporated into the main series.
- Review clarified that graceful standby restarts should preserve statistics #220 #221, while the implementation restored selectable snapshots and chose caching as the default #227.
- Andres adopted cumulative-statistics terminology, further separated transactional and shared-memory infrastructure, and expanded tests and documentation #230; Thomas Munro reviewed locking and error paths #231, and the header-comment cleanup 55e566fc4b and lightly edited dshash scan revision 909eebf27b landed from that submission.
- David G. Johnston proposed replacing statistics-kind property booleans with category enums #244, but the proposal was rejected and withdrawn #245 #246; his architecture-comment corrections #248 were partly incorporated into the final series #252.
- The last full submission #252 incorporated flush-scheduling fixes, fixed-width hashing, architecture explanations, and test stabilization after contention benchmarks showed little contention even with many clients #247.
- The final series #252 supplied single-user DSM support 46a2d2499a, transactional-code relocation ab62a642d5, collector-comment cleanup bdbd3d9064, send/report renaming cc96373cf3, and relation-statistics copying 8ea7963fc7; the first three received light polishing and the last two matched their posted components.
- Final API discussion generalized reset operations #270 #273, producing the moderately revised API preparation 8fb580a35c from #252, alongside the lightly revised statistics-kind enum 997afad89d.
- Transactional statistics creation/drop scaffolding 8b1dccd37c and the replication-slot API preparation e41aed674f landed from #252 with allocation/cleanup fixes and an expanded slot-pointer drop API, respectively.
- The central shared-memory implementation from #252 landed as 5891c7a8ed with final reset-API and localized correctness changes, replacing the UDP collector with shared storage and transactional cleanup of dropped objects.
- The same final series #252 supplied stats_temp_directory removal 6f0cf87872, the cumulative-statistics GUC group rename 1db4e5a4ee, and relocation of pgstat.c into utils/activity fbfe6910ec, while retaining pg_stat_tmp for extensions.
- The flush helper and test simplification from #252 were combined into 0f96965c65, and Melanie's existence helper landed under the reviewed pg_stat_have_stats name as ad401664b8.
- The transaction/two-phase/function tests and restart/crash tests from #252 landed with light test polishing as e349c95d3e and 16acf7f1aa.
- The physical-replication tests 53b9cd20d4 and more substantially revised recovery-conflict tests 9f8a050f68 landed from #252, followed by the combined reset/subscription/slot coverage 5264add784.
- Thomas Munro, Justin Pryzby, David G. Johnston, and Lukas Fittl helped clarify documentation and cache/snapshot behavior #231 #266 #268 #282; the documentation component of #252 landed with wording and restart-semantics edits as b3abca6810, and the CommitFest entry was closed #285.
- David G. Johnston subsequently found reset timestamps left at the epoch after crash recovery #291 #292, Michael Paquier reproduced the problem #294, and Andres's inline correction #293 landed with regression coverage as 5cd1c40b3c.
Jul - Aug 2022 · 1 entry
- Later discussion examined shared-memory consumption and exporter access across databases #296 #305; an external extension demonstrated that exporter access did not require an immediate core patch #313, while statistics separation and extensibility remained future work #324 #325.
Dec 2024 · 3 entries
- In 2024, Anton A. Melnikov questioned the dropped-entry assertion at shutdown #326 #328, prompting Bertrand Drouvot to explain the defensive skip in a comment patch #331 and revise it after review #333.
- Anton approved Bertrand's explanation #334, and Michael Paquier committed the lightly reworded comment from #333 as 001a537b83 and backpatched it #335.
- Anton separately proposed a production warning on top of that comment #334 and revised it after feedback #339; at the last message, the shared-memory implementation and comment clarification had landed, but the warning remained under discussion.