model-writtenrun 3418 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Sep - Dec 2023 · 14 entries
- Jeff Davis noticed that GenericXLogFinish marked buffers dirty after WAL insertion, contrary to the documented ordering, and Heikki Linnakangas confirmed the bug while proposing an assertion to detect similar mistakes #1 #2.
- Jeff's first fix separated modification, registration, and LSN assignment into three traversals; Heikki questioned the extra traversal, and Jeff combined modification and registration in the revised patch #3 #4 #5.
- Investigation of hash-index callers showed that some clean buffers were deliberately registered to obtain cleanup locks during replay; Robert Haas explained the locking protocol, and Heikki proposed REGBUF_NO_CHANGE to identify these exceptions #7 #8 #9.
- Jeff committed and backported the GenericXLogFinish fix from #5 with an expanded delta-computation comment as ef74c7197c, then submitted a separate assertion patch using a broader REGBUF_CLEAN_OK bypass #11.
- Heikki requested an explicit exclusive-lock assertion and refactoring of GIN callers instead of exempting them; Jeff implemented those changes and restored the narrower REGBUF_NO_CHANGE name #12 #14.
- Robert favored retaining exceptions for intentionally clean hash buffers rather than dirtying them unnecessarily, and clarified that changing a page LSN without dirty marking would itself be a bug #17 #19.
- Jeff landed the assertion patch from #14 unchanged as 00d7fb5e2e and announced completion in #20.
- Alexander Lakhin then supplied a hash-index vacuum case that failed the new assertion, and Jeff reproduced it and identified an unconditional LSN update on a clean write buffer #21 #22.
- Michael Paquier proposed allowing clean registration when the primary and write buffers coincide, but Amit Kapila identified another zero-tuple case; Robert and Amit clarified that primary-page cleanup locking and write-buffer modification impose separate requirements #27 #28 #30 #31.
- After Michael highlighted missing regression coverage, Amit replaced the narrow exception with conditional registration and corresponding replay changes, including the case where the write buffer is also the previous bucket #32 #33.
- Hayato Kuroda corrected the flag type, simplified the conditions, and added empty-overflow-page regression cases; Amit's review then refined the tests and removed an unrelated loop-variable change #34 #35 #36 #37 #38.
- Amit committed the jointly authored fix from #38 with comment and formatting edits as 861f86beea; Robert subsequently questioned the registration logic, and Amit explained why aliased previous and write buffers were not registered elsewhere #39 #40.
- Alexander's Valgrind testing exposed an uninitialized writebuf in the new conditional replay path, prompting Hayato to initialize it to InvalidBuffer and add another regression case #41 #43.
- Amit checked the test runtime, Alexander confirmed the fix and reproducer, and Hayato verified coverage before Amit landed #43 with test-comment edits as f66fcc5cd6 #44 #45 #46 #47.
Feb 2024 · 3 entries
- In February, Michael reported that _hash_freeovflpage still updated the write-buffer LSN even when the buffer was omitted from WAL, and Hayato supplied a diagnostic patch guarding the update by registration status #48 #50.
- Amit pointed out that even registered buffers must retain their LSN when marked REGBUF_NO_CHANGE, so Hayato switched to tracking actual modification and Michael endorsed the revision #51 #52 #53.
- Amit committed that revision with comment and brace edits as aa5edbe379 and announced it in #54.
Apr 2024 · 4 entries
- In April, Michael reported the remaining replay asymmetry: hash_xlog_squeeze_page still dirtied and updated the LSN of a buffer that the primary left unchanged; Amit suggested a modification flag, Hayato implemented it, and Michael credited Zubeyr Eryilmaz for the report #56 #57 #58 #59.
- Michael requested consistent naming and an assertion for the no-tuples case, then forwarded Hayato's revision alongside experimental WAL instrumentation that demonstrated the LSN mismatch and validated the fix #60 #61 #62.
- The experimental consistency patch was deliberately excluded because it consumed a WAL image flag bit; Michael also identified a recovery-test hang to pursue in a separate thread #62.
- After Amit approved the replay fix and improved its assertion comment, Michael committed only the first patch from #62 as f56a9def71; the thread ended with all concrete fixes landed and broader replay consistency checks still an investigation idea #63 #64.