Re: tsearch2: restoring problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Fischer Ulrich <ulrich(dot)fischer(at)aerodynamics(dot)ch>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: tsearch2: restoring problem
Date: 2004-02-16 15:41:42
Message-ID: 25812.1076946102@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Fischer Ulrich <ulrich(dot)fischer(at)aerodynamics(dot)ch> writes:
> I have a problem with the restoring of a database which uses tsearch2. I
> made a backup as discribed in 'tsearch-v2-intro' on the tsearch2 page.
> Now i'm trying to restore it into a testdatabase. The problem is, that
> the entries of the relations 'pg_ts_cfg', 'pg_ts_cfgmap', 'pg_ts_dict'
> and 'pg_ts_parser' are not correctly restored. I get errors like:

> psql:restoretest.out:28223: ERROR: copy: line 1, Cannot insert a
> duplicate key into unique index pg_ts_dict_pkey

Guessing, but it kinda sounds like you are trying to restore into a
database that already contains tsearch2 support. If you've installed
tsearch2 into template1 then this is a likely gotcha, since the tsearch2
objects will propagate into any database cloned from template1. If
that's the problem then the answer is to create your database from
template0 instead of template1 before you run the restore. See the
CREATE DATABASE man page and/or the discussion of template databases in
the administrator's guide.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-02-16 15:45:47 Re: Dazed and Confused
Previous Message Mikhail Terekhov 2004-02-16 15:27:32 Re: Using NOTIFY... Slow Client Querys