model-writtenrun 7433 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Mar 2021 · 4 entries
- Andres Freund opened the thread with concerns about lost drop-slot messages, array overflow after lowering max_replication_slots, locking and linear searches in pgstat.c, inconsistent slot-name types, missing total counters, and statistics lost on interrupted decoding #1.
- Andres proposed indexing statistics by replication-slot array positions #4, but Masahiko Sawada explained that restart and filesystem traversal can change those positions #11, and Andres acknowledged the problem #14.
- The storage redesign was temporarily deferred while shared-memory statistics remained a possibility #18, and Andres requested restart/drop tests and an independent total-data counter patch #20.
- Vignesh supplied initial restart/drop tests #23, then expanded the work into NameData conversion, total transaction and byte counters, tests, and an array-overflow workaround #27.
Apr 2021 · 19 entries
- Sawada's review requested a statistics-structure argument, tests under contrib/test_decoding, and descriptions based on decoded data rather than network traffic #28; Vignesh incorporated those changes across #32 and #36.
- Amit Kapila identified incorrect accounting for aborted, streamed, and interleaved transactions and subtransactions #38 #43, supplied a corrective delta #46, and Vignesh integrated and tested it #47.
- Sawada demonstrated that bounding the array would still leave new slots without statistics when abandoned entries filled it, and supplied an HTAB implementation with vacuum-driven cleanup #44; he merged it into the series and removed the superseded array workaround #52.
- Amit proposed landing NameData and total counters before the larger HTAB change #53, while Vignesh independently began the interruption fix by reporting after each spill or stream #54.
- Sawada's testing exposed severely understated totals for spilled transactions #62; Vignesh attempted a spillBytes-based correction #65, and Amit supplied the ultimately adopted approach of accounting before restoring each batch #70.
- The NameData and structure-argument component of #65 landed unchanged as cca57c1d9b, leaving the remaining work in #71.
- Amit consolidated total counters and basic tests #72, incorporated Sawada's documentation review into #76, and committed that version with a catalog-version bump as f5fc2f5b23.
- Vignesh resent the remaining HTAB and overflow-test work #81, and Amit's review requested unconditional dead-slot cleanup and other implementation refinements #82.
- Tom Lane reported intermittent buildfarm failures in the new tests #86; Amit identified missing reset synchronization and decoding #89, and Sawada and Vignesh independently supplied repairs #91 #92.
- Amit selected Vignesh's simpler repair #94, added Justin Pryzby's documentation corrections #78 and a statistics-format bump, and committed #92 as c64dcc7fee.
- HTAB review established that missing statistics should appear as zero counters with a null reset timestamp #97, and Amit proposed explicit creation messages to reset statistics when slot names are reused #100, implemented in #103.
- Vignesh reviewed the HTAB code and exposed the need for a catalog-version bump #101 #105, while Dilip Kumar reviewed moving slot validation out of the collector code #109.
- Amit found incorrect hash-table memory-context handling and a race in the new slot-recreation test #104 #113; Sawada removed that test and separated collector allocation from backend statistics-file allocation in #118 and #123.
- The final HTAB version #123 landed with a catalog-version bump as 3fa17d3771, fixing array overflow and exhaustion by stale entries while retaining slot names as keys.
- In parallel, Vignesh tried storing counters in shared ReplicationSlot data and sending them during release #98, refined by Amit #125, but Sawada objected to storing private counters in shared memory and its future growth #126 #131.
- Amit favored reporting after every spill or stream #132, so Vignesh revived that implementation #135 and simplified it to retain the existing decoding-context interface after review #142.
- Sawada then found that total_bytes incorrectly counted unrelated buffered transactions #146; Amit identified missing subtransaction handling #147, and successive tests and corrections exposed additional spill-related double counting #161 #162.
- A separate buildfarm failure reported by Tom #151 led Sawada and Amit to investigate stale statistics from reused slot names #152 #153; Sawada's distinct-slot-name and work-memory repair #158 landed unchanged as 51ef917303.
- Sawada used a small decoding plugin to cross-check byte totals and settled on per-transaction size during iteration and total_size during final processing #163; Amit's comment-polished version #166 landed unchanged as 205f466282.
May 2021 · 7 entries
- Sawada proposed tracking a static decoding-context pointer to report on release and context destruction #172, but deferred the more invasive lifetime changes for broader PostgreSQL 15 consideration #174.
- Amit combined Vignesh's simpler reporting patch with Sawada's clarification that decoded bytes do not measure network traffic #175 #176, and committed the combined version unchanged as 592f00f8de.
- Sawada recorded two accepted limitations: lost creation and deletion messages can still mix statistics for reused slot names, and interrupted decoding can still lose some total counters #185; the main open item was subsequently closed #187.
- Tom reported further test failures #188, and Sawada showed that immediate spill reporting allows spill counters to arrive before total counters, supplying a narrower assertion patch #189.
- Amit identified an additional race between reset and delayed spill messages #191, and Vignesh combined the assertion correction with removal of redundant reset-and-redecode checks #192; the discussion confirmed that those checks added no distinct code coverage #193 #194 #195.
- The combined test repair #192 landed unchanged as fc69509131, resolving the remaining reported test failures.
- Amit requested the missing logical-decoding documentation reference #199, Vignesh supplied it #200, and it landed with only line wrapping as 0c6b92d9c6; the final message confirms that commit, with the selected work landed and the previously acknowledged rare limitations deferred #201.