model-writtenrun 7872 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Konstantin Knizhnik reported that creating or reassigning ownership of ten million large objects consumed over 10 GB of backend memory because invalidation messages accumulated until transaction end #1.
- Tom Lane suggested bounding the invalidation queue by switching to invalidate-all messages, while questioning whether the added complexity justified addressing only one cost of such large operations #2.
- Konstantin implemented that approach behind invalidate_all_threshold, reported that it prevented the memory overflow, and questioned the need to traverse the chunk list to count messages; he also identified a separate misuse of the relation-map structure when processing snapshot invalidations #3.
- Michael Paquier supplied a separate two-line snapshot fix, reported finding no similar errors nearby, and proposed backpatching it because future structure changes could make the currently harmless inconsistency consequential #4.
- Michael committed the snapshot fix unchanged as 643428c54b and confirmed its application with backports in #5; the broader memory-bounding proposal in #3 remained unresolved at the end of the thread.