model-writtenrun 9552 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Oct 2018 - Apr 2019 ยท 19 entries
- Thomas Munro proposed separating fsync scheduling from md.c so future undo and SLRU storage managers could use the checkpointer, combining that refactoring with Andres Freund's file-descriptor-passing work to retain write-back errors #1.
- The rebased proposal exposed a deadlock between a backend holding a buffer lock while sending a request and the checkpointer trying to lock that buffer; Robert Haas questioned fallback costs and descriptor ordering, while Andres suggested sending after releasing the buffer lock #2 #3 #4.
- Thomas explained why assigning descriptor sequence numbers before writes was sufficient, resolving Robert's ordering concern, while Dmitry Dolgov's testing uncovered an incorrect timeout assertion #13 #14 #8.
- Thomas abandoned moving checkpoint buffer writes into the background writer and posted a lock-release and queue-draining experiment, but then withdrew its correctness argument because the buffer-header update timing did not work as assumed #15 #16.
- At the end of December, Thomas deferred descriptor passing because the deadlock remained unresolved and recast the series around smgrsync.c, individual-segment cancellation, and sorted vectors for sparse segment numbers; subsequent revisions repaired missing declarations, search bugs, and request processing #18 #19 #20.
- Kevin Grittner questioned whether Linux changes eliminated the need for descriptor passing, but Andres and Thomas explained that inode eviction could still erase unreported errors and that syncing every close had severe performance costs #21 #23 #25 #416028.
- Shawn Debnath took over revisions after reviewing the vector-based patches, first rebasing them and separating immediate relation and segment synchronization interfaces #29 #31.
- Following discussions at FOSDEM, Andres objected to exposing storage segmentation through SMGR, and Shawn replaced the vectors with hash keys containing fork and segment numbers, moved processing into smgr.c, and supplied benchmarking instrumentation #32 #33 #35.
- Andres then argued that fsync scheduling belonged below the storage-manager interface, and Thomas withdrew the now-unnecessary vector machinery while advocating compact opaque tags instead of full pathnames #36 #37.
- The participants settled on static handler dispatch, per-segment cancellation for relations, and callback-based filtering for database drops; Shawn implemented these choices in a separate storage/sync module #43 #45 #49 #51.
- Thomas's review led Shawn to close descriptors, centralize request submission and retries, improve cancellation handling, and separate md.h declarations; discussion retained distinct request-type and handler enums #53 #61 #65.
- Testing exposed a dramatic slowdown caused by sleeping 10 ms on every submission, which Shawn fixed alongside FileTag const-correctness and header cleanup, restoring normal regression-test runtime #66 #67 #71.
- After successfully trying the interface with his undo work, Thomas reconsidered opening and closing every file during synchronization and supplied callbacks that perform sync and unlink operations through the existing SMGR descriptor cache #74 #75.
- Thomas folded in that callback change, simplified filtering and request representation, and used an experimental SLRU conversion to discover that handler identity had to participate in request deduplication #78 #79 #81.
- The final submission placed the handler inside FileTag with compact handler and fork fields; the attached SLRU conversion remained an explicitly uncommitted proof of concept, and the earlier reported performance gains had not been reproduced by Thomas #79 #82.
- Andres questioned using BlockNumber for segment numbers, and Thomas changed the field to uint32 before committing only the refactoring portion of #82 as 3eb77eba5a, with additional declaration, accounting, and cleanup edits #84 #87.
- Alvaro Herrera supported a dedicated segment-number typedef, prompting Thomas to post a separate cleanup extending SegmentNumber usage to md.c and frontend tools #88 #89.
- Post-commit testing with one-block relation segments exposed incorrect _mdfd_getseg() arguments and a checkpointer panic; Thomas fixed the block-number conversion and truncated-segment handling, along with errno and unlink cleanup, in 794c543b17 following #91.
- The thread ended with the generic queue refactoring and its correctness fix committed, descriptor passing deferred, the SLRU experiment uncommitted, and Alvaro noting that the separate SegmentNumber cleanup had not landed #18 #79 #93.