model-writtenrun 5793 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Bharath Rupireddy reported that BeginCopyTo() prematurely switched out of the COPY memory context, identifying the earlier COPY code split as the likely cause #1.
- Bharath supplied a patch deleting the intermediate context switch so subsequent COPY initialization would remain in the dedicated context #1.
- Japin Li tested the patch, reported passing regression tests, and said it looked good #2.
- Michael Paquier confirmed that moving BeginCopy() internals into BeginCopyTo() had apparently introduced a copy-and-paste error and promised to fix it in the thread's final message #3.
- Michael subsequently committed the patch from #1 unchanged as dc084d7c73, crediting Bharath as author and Japin as reviewer and backpatching through PostgreSQL 14; the proposed fix was fully landed.