=?koi8-r?B?5dLPyMnOIOTFzsnTIPfMwcTJzcnSz9fJ3g==?= <erohin-d@datagile.ru> writes:
> There is a problem on receiving large tsvector from binary format with
> getting error "invalid tsvector: maximum total lexeme length exceeded".
Good catch! Even without an actual failure, we'd be wasting space
on-disk anytime we stored a tsvector received through binary input.
I pushed your 0001 and 0002, but I don't really agree that 0003
is an improvement. It looks to me like it'll result in one
repalloc per lexeme, instead of the O(log N) behavior we had before.
It's not that important to keep the palloc chunk size small here,
given that we don't allow tsvectors to get anywhere near 1Gb anyway.
regards, tom lane