model-writtenrun 6964 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Oct - Nov 2023 · 4 entries
- Smolkin Grigory reported that a successfully created primary-key index could leave pg_class.relhasindex false, supplying WAL evidence that an inplace update had been lost behind a concurrent transactional update #1.
- Noah Misch reproduced the corruption with GRANT overlapping ALTER TABLE ADD PRIMARY KEY and outlined alternatives involving stronger locks, short-lived tuple protection, or changes to relhasindex maintenance #5 #7.
- Tom Lane showed that the problem also threatened pg_database and other inplace-updated fields, while Noah treated frozen-XID durability as critical; this ruled out solving only relhasindex and led Tom to suggest reusing tuple locks #8 #9 #10.
- Noah posted t_ctid-canary and tuple-lock prototypes, but demonstrated that an aborted transactional update could erase the canary, leaving that approach unable to guarantee protection #12.
May - Oct 2024 · 23 entries
- After a six-month gap, Noah returned with the tuple-lock series, choosing waits over errors or complicated successor-chain mutation and adding executor support for direct catalog updates; his tests also demonstrated overwriting unrelated catalog tuples #13.
- Noah explicitly separated invalidation durability, crash-ordering concerns, and PROC_IN_VACUUM catalog-scan failures from this locking series, documenting them as additional work rather than claiming the patches fixed every inplace-update problem #13.
- Robert Haas's review prompted clearer executor and catcache explanations and split the missing-lock patch into sequence, partitioned-index, and new-relation fixes with independently stated consequences #19 #23.
- Michael Paquier questioned identifying injection waits by event-name prefixes, Robert advocated a dedicated wait-event class, and their discussion settled on InjectionPoint so isolation tests could recognize blocking automatically #14 #21 #31 #33.
- Michael's review of invalid custom-event handling led Noah to supply a delta using complete wait-event information as the lookup key; the revised submission folded that in and added catalog replay comparisons and resilient sysviews tests #34 #37 #38 #39.
- The first landing included the unchanged Meson TODO-handling component from #33 as 22a4b104ba and the catalog-test component from #39 as 0844b39689, with small locale and TOAST-test adjustments.
- The same landing committed the InjectionPoint class from #39 as bb93640a68, and the unchanged wait-function extraction and injection isolation suite from #33 as abfbd13af0 and c35f419d6e.
- The executor comments and assertion from #33 landed unchanged as d5f788b41d, while its sequence and partitioned-index locking prerequisites landed as f88cdb36c4 and 0cecc908e9.
- The new-relation lock from #33 landed unchanged as 5b823b179e, and its TOAST-related catcache protection landed with an additional header include as f9f47f0d93.
- Buildfarm cache-clobber configurations immediately exposed unstable output in the new inplace-inval test; Tom recommended suppressing that observation, and Noah implemented the discussed strategy without an attached patch in b99414de90 before resubmitting the remaining locking work #40 #41 #42.
- Alexander Lakhin found that the proposed successor handling rejected ANALYZE after detaching a partition; Noah first added command-counter increments, then recognized and separated an existing bug that lost the empty partitioned table's reltuples update #43 #44 #45.
- Alexander also found that the newly committed executor assertion rejected valid MERGE-on-view statements containing only DO NOTHING actions, leading Noah to add a separate assertion correction and regression tests #46 #47.
- The two fixes from #47 landed unchanged as 7102070329 and d5e6891502, leaving the three principal locking patches for review #48.
- Alexander reproduced intermittent failures in the newly added database isolation test and verified that the pending locking series stabilized it; Noah and Tom preferred completing the real fix over developing another temporary workaround #49 #50 #51 #53.
- Heikki Linnakangas reviewed the remaining series and requested clearer lock rules and better separation between catalog scanning and heap operations, prompting systable wrappers in genam.c while heapam.c retained tuple-lock responsibility #54 #56 #57.
- Nitin Motiani examined the revised interfaces and cached executor flag, leading to the heap_inplace_update_and_unlock name and an assertion checking ResultRelInfo consistency; he then completed his review #58 #60 #62 #63 #64 #66.
- The optional proposal to require tuple locks for every index pg_class update remained separate and was left out of the landing because Noah did not consider it a net improvement and reviewers expressed no strong preference #57 #63 #64 #67.
- For older branches, Noah deliberately left direct superuser UPDATE protection incomplete on PostgreSQL 12 and 13 because the required executor infrastructure was absent, and prepared tablespace refactoring to avoid holding tuple locks throughout a potentially long data copy #69.
- The final warning component from #63 landed unchanged as dbf3f974ee, and the successor-update component landed as a07e03fd8f with a minimal adaptation to the newer scan-key-copying implementation.
- The final heap_update-caller protection from #63 landed unchanged apart from rebasing as aac2c9b4fd, while the older-branch tablespace prerequisite described in #69 landed as 1299564cb9.
- The landing immediately produced a buildfarm failure reported by Noah, and 90f5412a9a corrected an early MERGE exit that otherwise reached cleanup with an uninitialized value #70.
- Alexander later supplied a Valgrind reproducer for another uninitialized read in heap_inplace_lock; Noah avoided computing the unused result and preserved the reproducer as an additional isolation permutation, committing #72 unchanged as e947224cbb #71.
- Noah subsequently pointed to a separate discussion about restoring buffer unpinning during waits, continuing the refinement of the earlier heapam/genam changes outside this thread #73.
Mar 2025 · 1 entry
- Andres Freund found that the Meson testwrap change delayed visible progress through stdout buffering, posted an explicit flush, and committed it unchanged after Noah's acceptance as 9de86e367a #74 #75 #76.
Sep 2025 · 1 entry
- Tom later discovered that the catalog tests' RESET TABLESPACE commands were ineffective; Noah replaced them with an actual tablespace move and a rolled-back rename, and the reviewed patch landed unchanged on master as 4adb0380b9 #77 #78 #79 #81 #82.
Feb 2026 · 1 entry
- At the thread's end, the main locking work and its follow-up fixes had landed, but Alexander supplied another reproducer for the previously deferred PROC_IN_VACUUM scan problem; Noah identified it as still outstanding and distinguished it from a separate Windows test failure, which Alexander confirmed #84 #85 #86.