model-writtenrun 7086 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Lakhin reported concurrent GRANT operations reaching heap_update() with an unused line pointer in #1, then confirmed that pruning itself was legitimate in #2; Andres Freund suspected missing locking around cache invalidation in #3.
- Alexander extended the report to pg_statistic in #4, then reported that this case had been fixed elsewhere while the original case and a pg_subscription reproduction remained in #5; after Melanie Plageman could not reproduce the subscription failure in #6, Alexander supplied a self-contained reproducer in #7.
- Noah Misch supplied an injection-point reproduction in #8 and explained that syscache tuples can lack both a protecting snapshot and a buffer pin; he favored a localized runtime failure over changing every catalog-update caller to pin tuples or acquire stronger locks.
- Noah initially believed the race caused only transient errors, but the revised reproduction in #9 proved that heap_update() could overwrite the page header before any uniqueness check, leading him to choose a runtime check returning TM_Deleted.
- The three-patch series in #10 implemented that guard, consolidated XID conversion for the pruning-horizon helper, and disabled Meson runningcheck for these isolation tests; its rewritten tests also covered cache-discard and parallel-query configurations.
- Noah explicitly deferred a related lost-DDL-update bug in #10: if a pruned slot is reused by a newer version of the same catalog row, an update based on stale syscache data can discard intervening changes, and the proposed xmin validation would require broader changes.
- The prerequisites from #10 landed as 4f6ec3831d and 81772a495e, preserving their attached implementations; the XID conversion work originated in thread #50811, but this thread supplied its latest matching patchset, and the commit credited Michael Paquier's earlier review.
- The corruption repair and tests from #10 landed as d28cd3e7b2, with unchanged code hunks and a clarified commit message, backpatching the repair through PostgreSQL 13 and the injection-point tests through PostgreSQL 17.
- Andres reported an intermittent Valgrind failure in the new test at #11; Noah explained in #12 that the failing permutation exercised the deliberately unfixed lost-update bug and initially considered deleting it if failures accumulated.
- Alexander's reproducing recipe revealed that another permutation also failed, so Noah retained the coverage and supplied #13, addressing buffer-pin contention and old snapshots with stronger VACUUM behavior and pruning-horizon waits; he reported 1000 successful Valgrind iterations.
- The final attachment #13 subsequently landed unchanged as 5bbc596391, completing the test-race repair while the broader lost-DDL-update problem identified in #10 remained outside this thread's fixes.