model-writtenrun 9568 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- The thread began with Andres Freund's announcement that 558a9165e0 moved index-deletion XID horizon computation onto the primary to support table access methods and logical decoding on standbys, using sorted tuple identifiers and prefetching to limit overhead #1.
- Thomas Munro reported a reproducible self-deadlock in the test_decoding rewrite test, credited Peter Geoghegan with identifying the unsafe syscache access while holding a catalog buffer lock, and showed an inline catalog guard that fixed his reproduction #2.
- Andres Freund suggested using effective_io_concurrency for catalogs instead of the proof of concept's constant fallback #3; Peter clarified that his original code was diagnostic rather than a proposed final fix #4.
- Simon Riggs proposed storing a dead tuple's xmax in its index tuple to avoid later heap reads #8, but Andres identified torn-write risks when the replacement value and its identifying flag occupy different sectors #14; Peter considered related WAL-logged optimizations outside PostgreSQL 12's scope #13.
- Thomas submitted the sole attached patch, adding the catalog guard, the effective_io_concurrency fallback, and an explanatory comment, while observing that the existing hardwired addition of ten still enables prefetching when the setting is zero #15.
- Robert Haas proposed a separate setting for maintenance prefetching #16, supported by Peter Geoghegan #17; Thomas questioned why this differed from bitmap scans #18, and Andres explained that index-page maintenance serves multiple sessions #19.
- Simon acknowledged the atomic-update obstacle to his cached-XID proposal, deferred alternative designs beyond PostgreSQL 12, and retained his concern about measuring primary-side overhead #20.
- Thomas committed the attached deadlock fix as 4fd05bb55b, with only comment and commit-message edits, and announced the push #21; Andres separately recorded prefetch configuration as an open issue #22.
- In May, Andres favored leaving prefetch behavior unchanged for PostgreSQL 12 #23, and Robert accepted that absent evidence of practical harm #24; Tom Lane initially preferred removing the hardwired addition or introducing a separate setting #25, while Robert argued that the addition avoided a performance regression #26.
- Thomas later offered to implement a maintenance_io_concurrency setting #27, but Andres preferred retaining the current behavior for PostgreSQL 12 #28, and Tom agreed that designing a new setting around only one use case was premature #29.
- The thread closed with the deadlock fix committed and the existing effective_io_concurrency-plus-ten behavior retained; Thomas marked the open item resolved, leaving broader prefetch configuration improvements for future work #30.