<div dir="ltr">Hi all.  I wanted to follow up for posterity.  I had several challenges with the 2.3-2.4.0-upgrade and culled info from IRC, listserv, and direct troubleshooting.<div><br></div><div>1. Error on "DROP EXTENSION tsearch2" resolved by</div>
<div><b style="font-style:italic">  </b>a. Wrong search_path.  Fixed by running ALTER DATABASE evergreen SET search_path TO evergreen, public, pg_catalog;</div><div>  b. Adding 2 commands prior to the DROP EXTENSION command:  DROP AGGREGATE agg_tsvector(tsvector); DROP FUNCTION public.tsvector_concat(tsvector, tsvector);</div>
<div><br></div><div>After I resolved those two issues, I still had the following error:</div><div><div>2014-05-07 10:51:21 PDT ERROR:  cannot drop extension tsearch2 because other objects depend on it</div><div>2014-05-07 10:51:21 PDT DETAIL:  index authority.authority_full_rec_index_vector_idx depends on operator class gist_tsvector_ops for access method gist</div>
<div>        index metabib.metabib_full_rec_index_vector_idx depends on operator class gist_tsvector_ops for access method gist</div><div>        index metabib.metabib_author_field_entry_index_vector_idx depends on operator class gist_tsvector_ops for access method gist</div>
<div>        index metabib.metabib_keyword_field_entry_index_vector_idx depends on operator class gist_tsvector_ops for access method gist</div><div>        index metabib.metabib_series_field_entry_index_vector_idx depends on operator class gist_tsvector_ops for access method gist</div>
<div>        index metabib.metabib_subject_field_entry_index_vector_idx depends on operator class gist_tsvector_ops for access method gist</div><div>        index metabib.metabib_title_field_entry_index_vector_idx depends on operator class gist_tsvector_ops for access method gist</div>
</div><div><br></div><div>I resolved this by dropping the old indexes (looks like they are superseded by a different index naming scheme). </div><div>  c. Dropping some old additional indexes (added around line 81)</div><div>
 </div><div><br></div><div>DROP INDEX authority.authority_full_rec_index_vector_idx;</div><div>DROP INDEX metabib.metabib_full_rec_index_vector_idx;</div><div>DROP INDEX metabib.metabib_author_field_entry_index_vector_idx;</div>
<div>DROP INDEX metabib.metabib_keyword_field_entry_index_vector_idx;</div><div>DROP INDEX metabib.metabib_series_field_entry_index_vector_idx;</div><div>DROP INDEX metabib.metabib_subject_field_entry_index_vector_idx;</div>
<div>DROP INDEX metabib.metabib_title_field_entry_index_vector_idx;</div><div><br></div><div><br></div><div>2. A second error was encountered, ERROR: cannot drop type search.search_result because other objects depend on it DETAIL:  function search.staged_fts</div>
<div><br></div><div>As it turns out, I had several overloaded function definitions, so although the upgrade script drops staged_fts it missed two of the overloaded functions.  I resolved by adding at about line 890</div><div>
<div><br></div><div>DROP FUNCTION search.staged_fts(integer,integer,text,integer[],text[],text[],text[],text[],text[],text[],text,real,text,boolean,boolean,boolean,integer,integer,integer);</div><div>DROP FUNCTION search.staged_fts(integer,integer,text,integer[],integer[],text[],text[],text[],text[],text[],text[],text,real,text,boolean,boolean,boolean,integer,integer,integer);</div>
</div><div><br></div><div>At this point I was able to complete the upgrade to 2.4.0 (so far, so good).<br><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 8, 2014 at 10:05 AM, Lazar, Alexey Vladimirovich <span dir="ltr"><<a href="mailto:alexey.lazar@mnsu.edu" target="_blank">alexey.lazar@mnsu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, Jeff.<br>
<br>
I do not have a specific answer, but a few things I would do to troubleshoot:<br>
<br>
* Review all the schema patches from the upgrade log table in the database and cross-reference with patch numbers in the upgrade and/or version-upgrade script folders. Anything missing?<br>
* Grep through the schema upgrade folder and version-upgrade folder for the keywords that come up in your errors to see what/when was added or could be missing<br>
* You may want to search through bugs and git repo<br>
<br>
Generally, I found that is it more reliable to use minor version schema upgrade scripts up to the max “minor" version and then upgrading to the next “major” version.<br>
<br>
Also, I found that when I encountered a “weird" error that is not generally known in the community, it was a local error. The two I have encountered were related to missing schema patches.<br>
<br>
Just FYI, over the past couple years I have upgraded data all the way from 2.0 to 2.5 now and from 2.2 to 2.5 and have not seen this error.<br>
<br>
I know this does not specifically answer your question directly, but I hope this helps a little.<br>
<br>
Aleksey<br>
<div><div class="h5"><br>
On 2014-03-30, at 11:42 , Jeff Green <<a href="mailto:jeff.green.ca@gmail.com">jeff.green.ca@gmail.com</a>> wrote:<br>
<br>
> Hi. I'm running into an issue upgrading EG 2.2.0 to the latest, and could use some help on what to try next. The upgrade crashes during the 2.3-2.4.0 script, on the DROP EXTENSION tsearch2 command.<br>
><br>
> There was an IRC chat (<a href="http://evergreen-ils.org/irc_logs/evergreen/2013-06/%23evergreen.27-Thu-2013.log" target="_blank">http://evergreen-ils.org/irc_logs/evergreen/2013-06/%23evergreen.27-Thu-2013.log</a>) about adding a couple statements. However, still got the same error.<br>

><br>
> I also tried DROP...CASCADE; but that created other errors later.<br>
><br>
> So, I rolled back to my previous snapshot (VM) and am asking for some advice on how to proceed!  Any suggestions on what to do next?<br>
><br>
> Here's the error:<br>
> 2014-02-28 13:48:30 PST ERROR:  cannot drop extension tsearch2 because other objects depend on it<br>
><br>
> Here's the statements I added immediately before the DROP EXTENSION tsearch2:<br>
> DROP AGGREGATE agg_tsvector(tsvector);<br>
> DROP FUNCTION tsvector_concat(tsvector, tsvector);<br>
><br>
> Script is also throwing these errors:<br>
> psql:2.3-2.4.0-upgrade-db.sql:3996: ERROR:  text search configuration "english_nostop" does not exist<br>
> psql:2.3-2.4.0-upgrade-db.sql:3997: ERROR:  text search configuration "english_nostop" does not exist<br>
> psql:2.3-2.4.0-upgrade-db.sql:3998: ERROR:  text search configuration "english_nostop" does not exist<br>
> psql:2.3-2.4.0-upgrade-db.sql:3999: ERROR:  text search configuration "english_nostop" does not exist<br>
> psql:2.3-2.4.0-upgrade-db.sql:4000: ERROR:  text search configuration "english_nostop" does not exist<br>
><br>
><br>
> Thanks!<br>
><br>
> --<br>
> Jeff Green<br>
><br>
</div></div>> _______________________________________________<br>
> Evergreen-admin mailing list<br>
> <a href="mailto:Evergreen-admin@list.evergreen-ils.org">Evergreen-admin@list.evergreen-ils.org</a><br>
> <a href="http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-admin" target="_blank">http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-admin</a><br>
<br>
Aleksey Lazar<br>
IS Developer and Integrator - PALS<br>
<a href="http://www.mnpals.org/" target="_blank">http://www.mnpals.org/</a><br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Jeff Green<br><br>
</div>