tsearch2 upgrade problem and mediawiki

From: Jon Lapham <lapham(at)jandr(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: tsearch2 upgrade problem and mediawiki
Date: 2007-08-02 18:00:23
Message-ID: 46B21BB7.4020703@jandr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

After upgrading from Postgres 8.1 to 8.2 (via pg_dumpall) I had problems
with mediawiki (v1.9.2) that utilized tsearch2. I thought I had fixed
the problem by removing tsearch2 in my v8.1 databases, pg_dumpall-ing
and reloading to v8.2, and re-installing tsearch2 from scratch.

When updating a page in mediawiki, I get an error. This is what I am
seeing in my pg_log:

STATEMENT: SELECT nextval('rev_rev_id_val')
ERROR: record "new" has no field "textvector"
CONTEXT: PL/pgSQL function "ts2_page_text" line 3 at assignment
STATEMENT: INSERT /* Revision::insertOn */ INTO pagecontent
(old_id,old_text,old_flags) VALUES ('2128','{| class="wikitable [snip]

The table "pagecontent" has a trigger:
wikidb=> \d pagecontent
Table "mediawiki.pagecontent"
Column | Type | Modifiers

-----------+---------+-------------------------------------------------------
old_id | integer | not null default
nextval('text_old_id_val'::regclass)
old_text | text |
old_flags | text |
Indexes:
"pagecontent_pkey" PRIMARY KEY, btree (old_id)
Triggers:
ts2_page_text BEFORE INSERT OR UPDATE ON pagecontent FOR EACH ROW
EXECUTE PROCEDURE ts2_page_text()

with this code:

BEGIN
IF TG_OP = 'INSERT' THEN
NEW.textvector = to_tsvector('default',NEW.old_text);
ELSIF NEW.old_text != OLD.old_text THEN
NEW.textvector := to_tsvector('default',NEW.old_text);
END IF;
RETURN NEW;
END;

This looks like a problem with tsearch2 to me... can anyone give me a
pointer on where to go from here to debug this? Thanks!

-Jon

--
-**-*-*---*-*---*-*---*-----*-*-----*---*-*---*-----*-----*-*-----*---
Jon Lapham <lapham(at)jandr(dot)org> Rio de Janeiro, Brasil
Personal: http://www.jandr.org/
***-*--*----*-------*------------*--------------------*---------------

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrej Ricnik-Bay 2007-08-02 18:18:01 Re: Linux distro
Previous Message Magnus Hagander 2007-08-02 17:15:29 Re: pgTray - win32 tray tool for monitoring PostgreSQL service