Re: Restoring a db dump with tsearch fields fails - Mailing list pgsql-general

From Tom Lane
Subject Re: Restoring a db dump with tsearch fields fails
Date
Msg-id 5723.1036767744@sss.pgh.pa.us
Whole thread Raw
In response to Re: Restoring a db dump with tsearch fields fails  ("Robert John Shepherd" <robert@reviewer.co.uk>)
List pgsql-general
"Robert John Shepherd" <robert@reviewer.co.uk> writes:
> I get the following error:
>    pg_restore: [archiver (db)] could not execute query: ERROR:  Unable
> to locate type name 'txtidx' in catalog

IIRC, there is some issue with tsearch that makes it likely to fool
pg_dump into outputting items in the wrong order (ie, you may have
tables with txtidx columns appearing before the type txtidx is defined).
The short-term workaround is to manually fix the load order.  With a
text dump file you'd just hack away at it with a text editor.  With a
tar dump file, you need to use pg_restore's options that control the
load order.  I've never done this and can't offer any advice beyond
"read the man page" ...

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: command
Next
From: Andrew Sullivan
Date:
Subject: Re: HA PostgreSQL