model-writtenrun 8520 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Greg Burd opened a separate refactoring thread in #1 after an earlier CRC fix, proposing that hash WAL records carry the primary-bucket block number instead of registering an unchanged, pin-only buffer, followed by removal of REGBUF_NO_CHANGE.
- Greg explained in #1 that taking a content lock at the existing registration point could deadlock with split-bucket scans, while taking it earlier would add contention and full-page-image costs, motivating the unregistered-page approach.
- Vignesh implemented Amit Kapila's suggestion to append the block number only when replay cannot obtain it from a modified page in #2, avoiding four extra bytes in common records.
- Vignesh's REL_18 experiment in #3 demonstrated WAL incompatibility in both upgrade directions and supplied a compatibility shim, but Greg and Amit chose a master-only refactor in #4 and #5 because stable branches already had the CRC fix.
- Greg integrated Vignesh's optimization and an injection-point CRC recovery test in #4, also increasing WAL data-segment reservations after a 32-bit build exposed a 'too much WAL data' failure.
- Amit asked to merge the optimization into the main patch and eliminate gaps in registered block numbering in #7, and Greg implemented both changes in #11.
- Shihao Zhong identified a pre-existing torn-page hazard in #8: replay could read the primary bucket solely for its cleanup lock before reaching the full-page image that repairs it; Vignesh reproduced the failure in #9.
- Amit rejected using RBM_ZERO_ON_ERROR for the index's main fork and proposed delaying the read until hot standby was active in #10, leading Greg to prepend a separate InHotStandby-guarded fix and crash-recovery test in #12.
- Vignesh demonstrated that InHotStandby becomes true before recovery reaches consistency and supplied a standby reproducer plus a HotStandbyActiveInReplay() correction in #13; Greg incorporated both in #16, together with Hayato Kuroda's helper-name and comment improvements from #14.
- Joao Rito found that the CRC test could make pg_waldump inspect a zero-filled WAL segment in #17; Vignesh corrected segment selection, merged the torn-page tests, fixed standalone testing, and supplied stable-branch variants in #19.
- Joao confirmed that both the torn-page and CRC tests passed in #20, providing testing coverage for the corrected guard that ultimately landed.
- Greg's #21 incorporated Hayato's documentation suggestions from #18 but retained the older split tests and introduced a cleanup-lock helper; #22 returned to Vignesh's merged-test baseline and direct guarded calls.
- Cross-platform failures prompted Greg to replace fixed row ranges with pageinspect-based overflow-tuple selection in #23, keeping the torn-page test's required WAL ordering independent of tuple size.
- Amit requested committing the backpatchable fix without the complex torn-page test in #24; Vignesh posted the standalone fix with revised comments in #26, and Greg resent it unchanged in #27.
- Amit committed that standalone version as 8becd1123c, crediting Greg and Vignesh and backpatching through PostgreSQL 15; his confirmation in #28 proposed handling the pin-only refactor next and REGBUF_NO_CHANGE removal afterward.
- Vignesh resumed the remaining work with the refactor and CRC test in #29, and Hayato supplied a delta simplifying hash_xlog_squeeze_page() in #31 that Greg folded into #32.
- At the thread's end, Greg rebased and renumbered the CRC test in #33 and was still seeking a committer for the two remaining patches; the torn-page fix had landed, its reproducer remained uncommitted, and REGBUF_NO_CHANGE removal was deferred.