472,782 Members | 1,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,782 software developers and data experts.

tsearch2: restoring problem

Hi

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
psql:restoretest.out:28223: lost synchronization with server, resetting
connection
There should be made an additional entry for my german dicts. But it isn't.

Thanks for your help.

Ulrich


--
Ulrich G. Fischer Dipl. Natw. ETH
Center Aerodynamics Ruag Aerospace
P.O. Box 301 CH-6032 Emmen
Tel. +41 41 268 23 53 Fax. +41 41 268 38 97
ul************@aerodynamics.ch www.ruag.com
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 22 '05 #1
2 3611
Fischer Ulrich <ul************@aerodynamics.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

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 22 '05 #2
Tom Lane wrote:
Fischer Ulrich <ul************@aerodynamics.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

Thanks for your help. I can't remember to install tsearch2 into
template1. But anyway, I used now template0 and got the same error. I've
just seen, when I load the schema.sql of my db that there is already
something wrong:

ERROR: ALTER TABLE / PRIMARY KEY multiple primary keys for table
'pg_ts_dict' are not allowed
ERROR: ALTER TABLE / PRIMARY KEY multiple primary keys for table
'pg_ts_parser' are not allowed
ERROR: ALTER TABLE / PRIMARY KEY multiple primary keys for table
'pg_ts_cfg' are not allowed
ERROR: ALTER TABLE / PRIMARY KEY multiple primary keys for table
'pg_ts_cfgmap' are not allowed

The input of tsearch2.sql runs error free. Bevor reading schema.sql, I
modified it like described in 'tsearch-v2-intro' (removing all tsearch2
relatet functions, data types and operators). Because of other errors
and because these four relations are already defined by tsearch2.sql, I
also removed their definition in schema.sql.

regards

Ulrich

--
Ulrich G. Fischer Dipl. Natw. ETH
Center Aerodynamics Ruag Aerospace
P.O. Box 301 CH-6032 Emmen
Tel. +41 41 268 23 53 Fax. +41 41 268 38 97
ul************@aerodynamics.ch www.ruag.com
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Alexander Regg | last post by:
Hi, Is it possible to get all the positions of a lexeme in a result-set of a query? For example, we have the table TEXT TEXT_IDX 'TSearch2 is...
13
by: Nigel J. Andrews | last post by:
This will be a little vague, it was last night and I can't now do the test in that db (see below) so can't give the exact wording. I seem to remember a report a little while ago about tsearch v2...
9
by: Pavel Stehule | last post by:
Hello I try tsearch2 within czech environment. It is works fine, but I have two questions. 1. I have words "se", "ve" in my czech stop words. But I get this words in result. Why? Have I...
16
by: Ben | last post by:
I'm trying to make myself a dictionary for tsearch2 that converts numbers to their english word equivalents. This seems to be working great, except that I can't figure out how to make my lexize...
2
by: Chris Gamache | last post by:
Tsearch2 comes with its own tsearch2 trigger function. You pass column names to it, and it puts a vanilla tsvector into the column named in TG_ARGV. Not only can you pass column names to it, but...
0
by: Markus Wollny | last post by:
Hi! Sorry to bother you, but I just don't know how to get tsearch2 configured correctly for my setup. I've got a 7.4.3 database-cluster initdb'ed with de_DE@euro as locale, the database is with...
3
by: Marcel Boscher | last post by:
Hello everybody, i tried to "J.U.S.T" install the FullTextSearchTool tsearch2 under the guidiance of : http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/...
2
by: Net Virtual Mailing Lists | last post by:
Hello, If I have a rule like this: CREATE OR REPLACE RULE sometable_update AS ON UPDATE TO table2 DO UPDATE cache SET updated_dt=NULL WHERE tablename='sometable'; CREATE OR REPLACE RULE...
7
by: Timo Haberkern | last post by:
Hi there, i have some troubles with my TSearch2 Installation. I have done this installation as described in http://www.sai.msu.su/~megera/oddmuse/index.cgi/Tsearch_V2_compound_words...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.