Unqualified references in evergreen.unaccent_and_squash lead to index creation failures with pg_restore
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Medium
|
Unassigned | ||
2.12 |
Fix Released
|
Medium
|
Unassigned | ||
3.0 |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Affects: Evergreen 2.11 and up.
Tested with PostgreSQL 9.4 and Evergreen 2.11.3
Attempting to dump and restore an Evergreen 2.11 or higher database generates up to four errors at restore time when attempting to create the following indexes on actor.usr:
If you're using the -e / --exit-on-error option to pg_restore, your restore will stop at the first error.
actor_usr_
actor_usr_
actor_usr_
actor_usr_
For reference/
If actor.usr contains no non-NULL values for a relevant column (say, actor.usr.
Full output of one error is:
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 6908; 1259 286024 INDEX actor_usr_
pg_restore: [archiver (db)] could not execute query: ERROR: function unaccent(text) does not exist
LINE 1: SELECT evergreen.
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT evergreen.
CONTEXT: PL/pgSQL function evergreen.
Command was: CREATE INDEX actor_usr_
summary: |
- Unqualified references in evergreen.unaccent_and_squash lead to Unqualified references in evergreen.unaccent_and_squash lead to index - creation failures with pg_restore index creation failures + creation failures with pg_restore |
Changed in evergreen: | |
status: | New → In Progress |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
status: | Fix Released → Fix Committed |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
Full error output, for benefit of future searchers:
pg_restore: [archiver (db)] Error while PROCESSING TOC: family_ name_unaccent_ idx evergreen lowercase( unaccent( regexp_ replace( arg, '\s'...
^ lowercase( unaccent( regexp_ replace( arg, '\s','','g'))) unaccent_ and_squash( text) line 3 at RETURN family_ name_unaccent_ idx ON usr USING btree (evergreen. unaccent_ and_squash( family_ name));
pg_restore: [archiver (db)] Error from TOC entry 6908; 1259 286024 INDEX actor_usr_
pg_restore: [archiver (db)] could not execute query: ERROR: function unaccent(text) does not exist
LINE 1: SELECT evergreen.
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT evergreen.
CONTEXT: PL/pgSQL function evergreen.
Command was: CREATE INDEX actor_usr_
pg_restore: [archiver (db)] Error from TOC entry 6910; 1259 286022 INDEX actor_usr_ first_given_ name_unaccent_ idx evergreen lowercase( unaccent( regexp_ replace( arg, '\s'...
^ lowercase( unaccent( regexp_ replace( arg, '\s','','g'))) unaccent_ and_squash( text) line 3 at RETURN first_given_ name_unaccent_ idx ON usr USING btree (evergreen. unaccent_ and_squash( first_given_ name));
pg_restore: [archiver (db)] could not execute query: ERROR: function unaccent(text) does not exist
LINE 1: SELECT evergreen.
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT evergreen.
CONTEXT: PL/pgSQL function evergreen.
Command was: CREATE INDEX actor_usr_
pg_restore: [archiver (db)] Error from TOC entry 6918; 1259 286023 INDEX actor_usr_ second_ given_name_ unaccent_ idx evergreen lowercase( unaccent( regexp_ replace( arg, '\s'...
^ lowercase( unaccent( regexp_ replace( arg, '\s','','g'))) unaccent_ and_squash( text) line 3 at RETURN second_ given_name_ unaccent_ idx ON usr USING btree (evergreen. unaccent_ and_squash( second_ given_name) );
pg_restore: [archiver (db)] could not execute query: ERROR: function unaccent(text) does not exist
LINE 1: SELECT evergreen.
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT evergreen.
CONTEXT: PL/pgSQL function evergreen.
Command was: CREATE INDEX actor_usr_
pg_restore: [archiver (db)] Error from TOC entry 6921; 1259 286025 INDEX actor_usr_ usrname_ unaccent_ idx evergreen lowercase( unaccent( regexp_ replace( arg, '\s'...
^ lowercase( unaccent( regexp_ replace( arg, '\s','','g'))) unaccent_ and_squash( text) line 3 at RETURN usrname_ unaccent_ idx ON usr USING btree (evergreen. unaccent_ and_squash( usrname) );
pg_restore: [archiver (db)] could not execute query: ERROR: function unaccent(text) does not exist
LINE 1: SELECT evergreen.
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT evergreen.
CONTEXT: PL/pgSQL function evergreen.
Command was: CREATE INDEX actor_usr_
WARNING: errors ignored on restore: 4