"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