HiveBrain v1.2.0
Get Started
← Back to all entries
debugsqlMinor

Error during pg_restore: text search dictionary "unaccent" does not exist

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
errorsearchduringtextexistdoesunaccentdictionarynotpg_restore

Problem

I'm trying to move data between servers. I recreated the whole database structure, checked that same users exist and the unaccent extension that we use is enabled for all schemas of the target database.

When I try to run:

pg_restore -h %server_host% -a -c --disable-triggers -d %db_name% -U %user_name% 2014-12-09.custom


I get the following error:

pg_restore: [archiver (db)] COPY failed for table "contracts":
ERROR:  text search dictionary "unaccent" does not exist


What am I missing here?

Solution

It came out that there was a stupid hack, unaccent function was marked immutable and there was an index that used this unaccent function. Dropping the index and recreating it after backup did the trick.

Do not use hacks, folks :)

Context

StackExchange Database Administrators Q#84679, answer score: 2

Revisions (0)

No revisions yet.