model-writtenrun 9263 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Rajkumar Raghuwanshi reported that dropping a deferred foreign key on a partitioned table after inserting a row caused COMMIT to fail with a missing-trigger error #1; Michael Paquier confirmed the bug back to PostgreSQL 11 #2, and Tom Lane identified the missing pending-trigger check on partitions #3.
- Alvaro Herrera traced the problem to dependency-driven constraint removal bypassing partition-use checks #4, then rejected his initial execution-phase fix because it checked the referenced side while the failing partition was on the referencing side #5.
- Alvaro posted a patch that checked partitions during DROP CONSTRAINT preparation and fixed the reproducer; he avoided adding recursion inside CheckTableNotInUse itself because its other callers might not support that behavior #6.
- Alvaro refined the helper's name and documentation, skipped the parent relation, and retained the partition-only scope in #7; his audit found no other subcommands needing this fix, while moving existing checks earlier was left outside its scope.
- Alvaro separately raised unresolved questions about logged/unlogged partition recursion and ALTER CONSTRAINT recursion in #7, without including changes for them in this fix.
- The final patch #7 landed as 5562272a42 with unchanged backend code and an added regression test; Alvaro announced that it had been pushed to all three branches #8.
- Tom Lane later noticed that the fixed bug remained listed as a live issue #9, and Alvaro confirmed that he closed the tracking entry #10, completing this bugfix.