Re: BUG #3975: tsearch2 index should not bomb out of 1Mb limit

From: Euler Taveira de Oliveira <euler(at)timbira(dot)com>
To: Edwin Groothuis <postgresql(at)mavetju(dot)org>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3975: tsearch2 index should not bomb out of 1Mb limit
Date: 2008-02-22 02:52:05
Message-ID: 47BE38D5.9000804@timbira.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-patches

Edwin Groothuis wrote:

> Ouch. But... since very long words are already not indexed (is the length
> configurable anywhere because I don't mind setting it to 50 characters), I
> don't think that it should bomb out of this but print a similar warning like
> "String only partly indexed".
>
This is not a bug. I would say it's a limitation. Look at
src/include/tsearch/ts_type.h. You could decrease len in WordEntry to 9
(512 characters) and increase pos to 22 (4 Mb). Don't forget to update
MAXSTRLEN and MAXSTRPOS accordingly.

> I'm still trying to determine how big the message it failed on was...
>
Maybe we should change the "string is too long for tsvector" to "string
is too long (%ld bytes, max %ld bytes) for tsvector".

--
Euler Taveira de Oliveira
http://www.timbira.com/

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Miroslav Nachev 2008-02-22 09:01:44 BUG #3980: Can not Install PostgreSQL - error at the end of installation
Previous Message Jeff Davis 2008-02-22 00:37:42 Re: BUG #3979: SELECT DISTINCT slow even on indexed column

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2008-02-22 03:20:23 Re: fix in --help output
Previous Message Stephen Davies 2008-02-22 00:07:32 Re: ts_headline