Re: [BUGS] BUG #3975: tsearch2 index should not bomb out of 1Mb limit - Mailing list pgsql-patches

From Tom Lane
Subject Re: [BUGS] BUG #3975: tsearch2 index should not bomb out of 1Mb limit
Date
Msg-id 28425.1204851902@sss.pgh.pa.us
Whole thread Raw
In response to Re: [BUGS] BUG #3975: tsearch2 index should not bomb out of 1Mb limit  (Euler Taveira de Oliveira <euler@timbira.com>)
Responses Re: [BUGS] BUG #3975: tsearch2 index should not bomb out of 1Mb limit  (Euler Taveira de Oliveira <euler@timbira.com>)
Re: [BUGS] BUG #3975: tsearch2 index should not bomb out of 1Mb limit  (Bruce Momjian <bruce@momjian.us>)
List pgsql-patches
Euler Taveira de Oliveira <euler@timbira.com> writes:
> Edwin Groothuis wrote:
>> Is it possible to make it a WARNING instead of an ERROR? Right now I get:
>>
> No. All of the other types emit an ERROR if you're trying an out of
> range value.

I don't think that follows.  A tsearch index is lossy anyway, so there's
no hard and fast reason why it should reject entries that it can't index
completely.  I think it would be more useful to index whatever it can
(probably just the words in the first N bytes of the document) than to
prevent you from storing the document.

There is another precedent too, namely that tsearch already discards
individual words over so-many-bytes long.  If it doesn't throw an error
for that case, why is it throwing an error for this one?

            regards, tom lane

pgsql-patches by date:

Previous
From: Edwin Groothuis
Date:
Subject: Re: [BUGS] BUG #3975: tsearch2 index should not bomb out of 1Mb limit
Next
From: Euler Taveira de Oliveira
Date:
Subject: Re: [BUGS] BUG #3975: tsearch2 index should not bomb out of 1Mb limit