model-writtenrun 8418 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Laurenz Albe reported that COPY TO releases its table lock before transaction end, allowing a concurrent DROP or TRUNCATE to disrupt repeated COPY operations under REPEATABLE READ, and asked whether to fix or document this behavior in #1.
- Robert Haas objected to the inconsistent locking behavior in #2, and Tom Lane advocated fixing user-table accesses only on the development branch because the consequences did not justify a backpatched behavior change in #4.
- Laurenz submitted the locking fix in #5, but Amit Kapila found that it also removed a necessary null check for query-based COPY in #6; Laurenz restored that guard in #7.
- Amit retained the corrected code and revised the commit message in #8, crediting Laurenz as author and Robert and Tom for their suggestions; Laurenz accepted it with a singular-word correction in #9.
- Amit committed #8 with that wording correction as a9cf48a4cf and announced the push in #10; Laurenz's thanks in #11 closed the thread with the fix landed and no backpatch planned.