model-writtenrun 3997 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Denis Erokhin reported that a legal tsvector of about 900 KB could fail a binary COPY round trip because tsvectorrecv() overestimated its data size, and supplied a three-patch series in #1.
- The first two patches corrected WordEntry to WordEntryPos in the size accounting and made the position-count storage explicit with sizeof(uint16) in #1.
- The third patch proposed calculating the required buffer length explicitly and changing when reallocations occur in #1.
- Tom Lane committed the first two patches together without code changes as 5b7b382464, documenting wasted disk space, rejection of valid inputs, and a possible out-of-bounds copy consequence, with backpatching to all supported versions.
- In the final reply, Tom Lane confirmed the first two patches had landed and declined the allocation optimization, expressing concern about its reallocation behavior and finding little benefit in tighter allocation for bounded-size tsvectors; no revised optimization followed in this thread #2.