model-writtenrun 6963 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Noah Misch opened the thread by proposing immediate invalidations inside the inplace-update critical section, preferring to unlink relcache initialization files before entering that section and initially planning to stop processing inplace invalidations during logical decoding #1.
- The first implementation included transactional commit hardening and prerequisite comment changes, but Noah withdrew those pieces after finding incorrect visibility ordering and missing COMMIT PREPARED handling, then discovering that existing error handling already promoted the relevant failures to PANIC #2 #3 #4.
- Andres Freund questioned whether callers depended on transactional invalidations and examined compatibility hazards in changing the WAL record, leading Noah to consider retaining both immediate and transactional invalidations and using a recovery-end cache reset on stable branches #5 #6.
- Noah attached a separate experiment eliminating invalidations from XID-less transactions, but later deferred that cleanup to another thread #7 #13.
- The obsolete xl_heap_inplace comment from #4 landed unchanged as 4a7f91b3d3.
- The main patch was rebased with externally reviewed prerequisites bundled for CI, then revised to retain transactional invalidation as insurance against existing caller dependencies #8 #10.
- Nitin Motiani reviewed the remaining patch's locking and callback design and reported successful testing; Noah subsequently fixed abort cleanup of inplaceInvalInfo and selected recovery-end cache resets after measuring the cost of more frequent resets #11 #12 #15 #16.
- The main invalidation implementation and the stable-branch recovery-reset attachment from #16 landed unchanged as 243e9b40f1 and d36b4d8ec3.
- Alexander Lakhin then reproduced server hangs involving CREATE TABLE and autovacuum, supplying a diagnostic delay and stack traces; Noah traced the failure to invalidation preparation initializing catalog caches while already holding an exclusive pg_class buffer lock #19 #21.
- While investigating the hang, Noah separately moved index_update_stats() I/O and visibility-map operations before buffer locking; that patch landed with only comment edits as b412f402d1 #20.
- Noah chose to prepare invalidations before locking the buffer and discard them when an update attempt was abandoned, rejecting eager initialization of unnecessary caches and broader changes to LWLock behavior; testing showed no hangs with the repair, which landed unchanged as 0bada39c83 #22.
- To avoid shipping the self-deadlock in a minor release, Noah reverted the dependent WAL-ordering change and then the invalidation change from stable branches as bc6bad8857 and c1099dd745, retaining the recovery-end cache reset because its benefits and risks were independent #22 #23.
- The defense against similar deadlocks proposed in #22 was implemented separately in thread #51414, where #589214 became f4ece891fc with light comment edits; Noah later included its backport alongside the repaired stable-branch submission and a CI placeholder #25.
- Paul A Jungwirth and Ian Ilyasov reviewed the repaired backport, reproduced the earlier hang, and confirmed that the repair prevented it; Paul's further investigation explained how concurrent invalidation traffic made the self-deadlock intermittent #26 #27.
- That review prompted Noah to document why transactional invalidations still matter to logical-decoding plugins and to exclude speculative non-comment decoding changes from the renewed backport #28.
- Paul and Surya Poondla reviewed the work again, with Paul supplying a small stable-branch comment fix and suggesting clearer explanations and removal of an unused parameter; Noah incorporated the feedback, and Paul approved the revision #29 #30 #32.
- The revised cleanup in #30 was split without substantive rewriting: general inplace-update comments became 0839fbe400, while invalidation documentation and the unused-parameter removal became 64bf53dd61.
- The renewed stable-branch work required ABI-history entries: 06b030e897 recorded the CacheInvalidateHeapTupleInplace() parameter removal, and 2e58802f73 recorded the PrepareToInvalidateCacheTuple() signature change.
- After pushing the bundle to PostgreSQL 14–17, Noah investigated a suspected buildfarm regression; Alexander identified it as an existing unrelated failure, and Noah closed the commitfest entry with the known reachable inplace-update corruption routes fixed #33 #34 #35.
- Mark Dilger subsequently reported that non-PGXN table access method extensions depended on the changed interfaces and objected specifically to backporting an unnecessary parameter removal, while Noah distinguished the two ABI changes and proposed warning package maintainers #36 #37 #38 #39.
- The thread ends with the fixes shipped but the ABI dispute unresolved: Peter Eisentraut requested reversal of unnecessary stable-branch interface changes, and Noah asked how to weigh compatibility now that releases already exposed the new interface #40 #41.