pg_migrator and an 8.3-compatible tsvector data type - Mailing list pgsql-hackers

From Bruce Momjian
Subject pg_migrator and an 8.3-compatible tsvector data type
Date
Msg-id 200905260145.n4Q1jx727301@momjian.us
Whole thread Raw
Responses Re: pg_migrator and an 8.3-compatible tsvector data type  (Bruce Momjian <bruce@momjian.us>)
Re: pg_migrator and an 8.3-compatible tsvector data type  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
I found out at PGCon that the internal format of tsvector changed
slightly from 8.3 to 8.4.  Teodor gave me a conversion function and I
have adjusted pg_migrator to install a v8_3_tsvector data type to be
used during the load so the old user tables use that data type.  You can
see the code here at the bottom of this file:

http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pg-migrator/pg_migrator/src/pg_migrator.c?rev=1.36&content-type=text/x-cvsweb-markup

I am not done yet because eventually v8_3_tsvector will be moved into a
separate schema and the tsvector data type restored.

The problem I have is that while I have created v8_3_tsvector (with
casts), I have not created index routines for it, so I get this error
when restoring a database that uses a GIN index on tsvector:
Restoring database schema                                  psql:/u/postgres/pg_migrator_dump_db.sql:7006: ERROR:  data
typetsvectorhas no default operator class for access method "gin"HINT:  You must specify an operator class for the
indexor define adefault operator class for the data type.
 

So, how do I create a compatible set of hooks for v8_3_tsvector? 
Because tsvector is a native data type I can't figure out how to set up
a similar type.  Also, will the indexes be OK if they are created from
types that don't have the 8.3 format?  What about new indexes created
after the migration is done?

Ideally the cast would just be called during index activity and the 8.4
tsvector index routines used.  I am told by Teodor that GiST indexes
would be fine with the 8.3 data format, and we are forcing the
reindexing of GIN indexes anyway in 8.4.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: generic options for explain
Next
From: Fujii Masao
Date:
Subject: Re: Synchronous replication: Admin command for replication_timeout_action