model-writtenrun 4910 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- vignesh C reported a reproducible pgstat_assoc_relation assertion failure after converting a table to a view, rolling back to a savepoint, and repeating the conversion in #1.
- Ajin Cherian traced the failure to a stale statistics association and proposed removing the relkind-based early return from pgstat_init_relation() in #2.
- Tom Lane proposed removing the obsolete table-to-view conversion feature from HEAD while retaining compatibility in PostgreSQL 15 in #3; Andres Freund supported that split and suggested handling statistics associations during relcache rebuilding in #4.
- Tom supplied the conversion-removal patch with documentation and test updates in #5, while Andres supplied a separate relcache-based statistics fix in #6, replacing Ajin's initial approach.
- Tom objected to calling pgstat_unlink_relation() inside the relcache swap critical section in #7; Andres moved unlinking before the swap, preserved the original sanity assertion, and added regression tests in #8.
- Tom recommended limiting the statistics fix to PostgreSQL 15 in #9 and adding a relkind-invariance assertion on HEAD in #11; Andres agreed in #12, and Tom proposed committing the assertion alongside the backpatched fix for a useful cross-reference in #13.
- Tom committed the conversion-removal patch from #5 unchanged as b23cd185fd and announced completion in #15.
- Andres committed the discussion-proposed HEAD assertion as cb2e7ddfe5, with the relcache fix and tests for PostgreSQL 15 and tests alone for older supported branches; in #17 he confirmed completion and explained that the older-branch tests were precautionary because no active bug had been found there.