vaccumdb fails saying function unaccent(text) doesn't exist
Hi everyone,
I migrated an postgresql instance from 9.5.4 to 9.5.21.
Unaccent extension is installed in the database, in "application" schema.
Since this migration, when i do a vaccumdb, i obtain an error :
vacuumdb: vacuuming of database "application" failed: ERROR: function unaccent(text) does not exist
LINE 2: SELECT lower(unaccent($1));
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY:
SELECT lower(unaccent($1));
CONTEXT: SQL function "lower_unaccent" during inlining
VACUUM (VERBOSE, ANALYZE);
I removed and reinstalled the extension, but the error continue to appear.
Following this post : /messages/by-id/CAPs+M8LCex6d=DeneofdsoJVijaG59m9V0ggbb3pOH7hZO4+cQ@mail.gmail.com , i installed the extension in public schema, the message still appear.
If i do a vacuum in sql command, i haven't the error.
May you have an idea of the cause of this issue and how to resolve it?
Thank you
Greg
Sent with [ProtonMail](https://protonmail.com) Secure Email.
greg1457 <greg1457@protonmail.com> writes:
I migrated an postgresql instance from 9.5.4 to 9.5.21.
Unaccent extension is installed in the database, in "application" schema.
Since this migration, when i do a vaccumdb, i obtain an error :
vacuumdb: vacuuming of database "application" failed: ERROR: function unaccent(text) does not exist
LINE 2: SELECT lower(unaccent($1));
This is probably a search_path problem. You've got an index expression
somewhere with a SQL function that is not being careful about which
schema(s) to look for "unaccent()" in. There were security fixes to
restrict the search path that VACUUM/ANALYZE runs with, which breaks
functions that aren't careful about that.
regards, tom lane