model-writtenrun 8272 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Bharath Rupireddy proposed avoiding an unused 64KB raw_buf allocation during binary COPY FROM, explaining that binary attribute reading uses attribute_buf instead #1.
- Rushabh Lathia supplied comment formatting and explicit NULL initialization changes #2, and vignesh C suggested a conditional expression #3; Bharath incorporated these into #4, which Vignesh subsequently confirmed #5.
- Tom Lane committed the patch as cd22d3cdb9, extending #4 to avoid allocating line_buf in binary mode as well and documenting the buffer roles; he explained this extension in #8.
- After the development-branch commit, Bharath supplied its changes adapted for PostgreSQL 13, 12 and 11 and requested backpatching #9.
- Tom Lane declined to pursue backpatching enthusiastically because there were no complaints and the transient 64KB allocation was modest, leaving the optimization committed on the development branch with no backpatch established in this thread #10.