model-writtenrun 5877 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Lakhin reported that concurrently detaching a sequence crashes an assertion-enabled PostgreSQL 14.1 server, whereas ordinary detach returns an error that the sequence is not a partition #1.
- Michael Paquier found the same issue for views and materialized views and attached a patch using ATSimplePermissions() to reject unsupported relation kinds, with regression tests #2.
- Peter Eisentraut questioned whether the added ownership check would reject otherwise valid operations #3; Michael confirmed that partition ownership can change after attachment and replaced his proposal with an inline deletion of the child-relation assertion, which also incorrectly excluded foreign tables #4.
- Kyotaro Horiguchi supported removing the assertion because existing checks reject relations that cannot be partitions, while the parent-table assertion remains valid #5.
- Alexander supplied an inline postgres_fdw regression test that concurrently detaches and reattaches a foreign-table partition #6.
- Michael committed the inline assertion removal and Alexander's test, with a comment and expected output, as 2e577c9446, backpatched through PostgreSQL 14; his final reply confirmed the fix was pushed, leaving no outstanding work in the thread #7.