8.4b2 tsearch2 strange error

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: 8.4b2 tsearch2 strange error
Date: 2009-06-02 06:48:03
Message-ID: 20090602.154803.50603987.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I have encountered strange errors while testing PostgreSQL 8.4 beta2.

SELECT msg_sid FROM msginfo WHERE plainto_tsquery(E'test') @@
body_index;
or
SELECT msg_sid FROM msginfo WHERE to_tsquery(E'test') @@ body_index;

produces following errors:

ERROR: tuple offset out of range: 0
(occasionally ERROR: tuple offset out of range: 459)

Here is the table definition:

CREATE TABLE msginfo (
msg_sid BIGSERIAL PRIMARY KEY,
file_size INTEGER,
file_mtime TIMESTAMP,
msg_date TIMESTAMP,
flags INTEGER,
hdr_from TEXT,
hdr_to TEXT,
hdr_cc TEXT,
hdr_newsgroups TEXT,
hdr_subject TEXT,
hdr_msgid TEXT UNIQUE NOT NULL,
hdr_inreplyto TEXT,
hdr_references TEXT,
body_text TEXT,
body_index TSVECTOR
);
CREATE INDEX msginfo_msg_date_index ON msginfo (msg_date);
CREATE INDEX msginfo_body_index ON msginfo USING gin (body_index);

and other info:

Ubuntu 8.04
./configure --prefix=/usr/local/pgsql84
initdb -E UTF-8 --no-locale /path/to/database

sylph=# EXPLAIN SELECT msg_sid FROM msginfo WHERE to_tsquery('test') @@ body_index;
QUERY PLAN

--------------------------------------------------------------------------------
-
Bitmap Heap Scan on msginfo (cost=4.59..8.61 rows=1 width=8)
Recheck Cond: (to_tsquery('test'::text) @@ body_index)
-> Bitmap Index Scan on msginfo_body_index (cost=0.00..4.59 rows=1 width=0)
Index Cond: (to_tsquery('test'::text) @@ body_index)
(4 rows)
--
Tatsuo Ishii
SRA OSS, Inc. Japan

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marko Kreen 2009-06-02 07:13:24 Re: PostgreSQL Developer meeting minutes up
Previous Message Fujii Masao 2009-06-02 06:45:14 Re: pg_standby -l might destory the archived file