model-writtenrun 2634 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Amul Sul reported that detaching a partition with its own foreign key referencing a partitioned table failed while looking for check triggers, and proposed skipping constraints whose parents belonged to the same partition in #1.
- Sami Imseih reproduced the bug with a single partition level, reported that Amul's patch crashed, and proposed comparing parent and child constraint relation IDs instead in #2; Amul agreed that both approaches aimed to preserve the partition's internal constraint links but requested crash details in #3.
- After Sami supplied the crash trace in #4, Alvaro Herrera identified the uninitialized OID list and judged Amul's original approach largely correct in #5.
- Sami questioned the list's potential size in #6, but Alvaro considered that concern impractical and the alternative catalog lookups slower, so he posted Amul's approach with initialization fixed, explanatory comments, and Sami's regression case in #7.
- Sami endorsed the revised patch while questioning whether any constraints were processed in the reported case in #8, and Alvaro confirmed that the top-level constraint and its children were skipped for different reasons in #9.
- Alvaro committed 1bc092519b from #7 with light loop-syntax changes and an additional inherited foreign key in the regression test; the commit records backpatching through PostgreSQL 15 because earlier branches used a different detach procedure.
- Alvaro announced the push in #10, and Amul thanked both contributors in #11, closing the thread with the fix landed and no outstanding work identified.