model-writtenrun 3248 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Thomas Munro opened the thread after two buildfarm animals failed the constraints regression test with a zero-byte read from an expected database block #1.
- Tomas Vondra initially considered a recent operating-system upgrade, but reproduced the failure on ext4, identified CLOBBER_CACHE_ALWAYS as the relevant setting, and confirmed that the breakage began with the new smgr bulk-loading facility; Ronan Dunklau consequently ruled out his separate FSM-corruption issue #2 #6 #7 #8.
- Tomas reduced the reproducer to a concurrent regression schedule, and Thomas reproduced the failure, noted additional corruption symptoms, and traced the problem to SMgrRelation objects being destroyed before transaction end #10 #11 #12.
- Thomas initially considered requiring callers to pin their references, then concluded that RelationCacheInvalidate() should release file resources without destroying SMgrRelation objects; Heikki confirmed that diagnosis with rr #12 #13 #14.
- Heikki attached a patch replacing smgrdestroyall() with smgrreleaseall() and removing RelationCloseSmgr() from the invalidation loop, while questioning whether resource release was still necessary #15.
- Thomas approved the patch and explained that missed invalidation messages could leave descriptors pointing to unlinked files after relfilenode reuse, so resource release had to remain; Heikki committed the patch with an additional comment cleanup as af0e7deb4a #16 #18.
- Three months later, Alexander Lakhin reported a regression introduced by that commit, supplying a concurrent VACUUM FULL, REINDEX, and table-creation workload that produced crashes and short reads; Michael Paquier recorded an open item #19 #20.
- Heikki reproduced the short-read error and explained that removing RelationCloseSmgr() allowed a relation to retain the SMgrRelation for its old physical file, then attached a follow-up restoring the call #21.
- Tom Lane questioned why ordinary heap rewrites had not exposed the problem, and Heikki explained that RelationClearRelation() already covered common cases before narrowing the fix to mapped relations immediately before their physical address is refreshed #22 #23.
- Heikki committed that narrower version as 441ef5e1ba and announced it in the final message, leaving both attached changes landed with no further patch awaiting review in this thread #24.