Re: Fix receiving large legal tsvector from binary format - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fix receiving large legal tsvector from binary format
Date
Msg-id 1842217.1696181041@sss.pgh.pa.us
Whole thread Raw
In response to Fix receiving large legal tsvector from binary format  (Ерохин Денис Владимирович <erohin-d@datagile.ru>)
List pgsql-hackers
=?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



pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Skip Orderby Execution for Materialized Views
Next
From: Peter Eisentraut
Date:
Subject: Re: Evaluate arguments of correlated SubPlans in the referencing ExprState