model-writtenrun 9826 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Stuart reported that creating a partitioned table with LIKE INCLUDING ALL after renaming a source-table constraint failed by looking up the old constraint name, while dropping and recreating the constraint avoided the failure #1.
- Amit Langote traced the problem to ALTER TABLE RENAME CONSTRAINT leaving stale relation-cache information, demonstrated that INCLUDING CONSTRAINTS could silently copy the old name, and supplied a relcache-invalidation patch with a regression test #2.
- After Michael Paquier confirmed that the bug reproduced back to PostgreSQL 9.4 #4, Amit supplied branch adaptations for PostgreSQL 9.4 through 10 because the original patch did not apply there #5.
- Michael reviewed the catalog invalidation paths, agreed with the fix and its placement, and requested a comment explaining why the parent relation's cache needed invalidation #6.
- Michael committed b13fd344c5 from #2, retaining its implementation while adding the explanatory comment, primary-key rename test coverage and test cleanup; he announced completion in #8.
- The buildfarm then exposed a failure with forced cache release: the patch closed the relation before invalidating its cache, so Michael identified that relation_close needed to follow CacheInvalidateRelcache #9.
- Michael reported reproducing the failure, checking the correction and committing a follow-up fix #11; Amit's final acknowledgment left no further work identified in the thread #12.