Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YikiJ-0005cy-89 for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Apr 2015 14:24:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YikiI-0007Za-Nh for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Apr 2015 14:24:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YikiI-0007ZU-1Y for pgsql-bugs@postgresql.org; Thu, 16 Apr 2015 14:24:18 +0000 Received: from smtp.covermymeds.com ([65.118.247.43] helo=spam.covermymeds.com) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YikiD-0003zK-BG for pgsql-bugs@postgresql.org; Thu, 16 Apr 2015 14:24:16 +0000 X-ASG-Debug-ID: 1429194245-07c599102f14a3b00001-Z0bQUL Received: from Ex2013MS03.innova.local ([192.168.30.104]) by spam.covermymeds.com with ESMTP id i9gQxU8AGLD53ICA (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 16 Apr 2015 10:24:08 -0400 (EDT) X-Barracuda-Envelope-From: CEstel@covermymeds.com Received: from Ex2013MS02.innova.local (192.168.30.103) by Ex2013MS03.innova.local (192.168.30.104) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Thu, 16 Apr 2015 10:23:59 -0400 Received: from Ex2013MS02.innova.local ([fe80::1175:1478:df3d:7e90]) by Ex2013MS02.innova.local ([fe80::1175:1478:df3d:7e90%18]) with mapi id 15.00.1044.021; Thu, 16 Apr 2015 10:23:55 -0400 From: CJ Estel To: Bruce Momjian CC: "pgsql-bugs@postgresql.org" Subject: Re: BUG #13042: pg_upgrade --check succeeded but run failed due to missing thesaurus file Thread-Topic: [BUGS] BUG #13042: pg_upgrade --check succeeded but run failed due to missing thesaurus file X-ASG-Orig-Subj: Re: [BUGS] BUG #13042: pg_upgrade --check succeeded but run failed due to missing thesaurus file Thread-Index: AQHQd+DqrAv3dcIEj0q6JZYQuq8lnp1PsjQA Date: Thu, 16 Apr 2015 14:23:54 +0000 Message-ID: References: <20150413151005.2527.42400@wrigleys.postgresql.org> <20150416010134.GA1672@momjian.us> In-Reply-To: <20150416010134.GA1672@momjian.us> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.1.73.57] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Barracuda-Connect: UNKNOWN[192.168.30.104] X-Barracuda-Start-Time: 1429194247 X-Barracuda-Encrypted: ECDHE-RSA-AES256-SHA X-Barracuda-URL: https://spam.covermymeds.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at covermymeds.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.17992 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Thanks for looking into this. Updating the documentation would be great. If it is easy to throw a warning message that thesauri were found and should be copied to the new location that would help people as well, even if it doesn't do the actual check for the existence of the files. On 4/15/15, 9:01 PM, "Bruce Momjian" wrote: >On Mon, Apr 13, 2015 at 03:10:05PM +0000, cestel@covermymeds.com wrote: >> pg_restore: creating FUNCTION plainto_or_tsquery("text") >> pg_restore: creating FUNCTION to_weighted_tsvector("text") >> pg_restore: creating TEXT SEARCH DICTIONARY cmm_thesaurus >> pg_restore: [archiver (db)] Error while PROCESSING TOC: >> pg_restore: [archiver (db)] Error from TOC entry 1745; 3600 60173 TEXT >> SEARCH DICTIONARY cmm_thesaurus postgres >> pg_restore: [archiver (db)] could not execute query: ERROR: could not >>open >> thesaurus file "/usr/pgsql-9.4/share/tsearch_data/cmm_thesaurus.ths": No >> such file or directory >> Command was: CREATE TEXT SEARCH DICTIONARY "cmm_thesaurus" ( >> TEMPLATE =3D "pg_catalog"."thesaurus", >> dictfile =3D 'cmm_thesaurus', dic... > >Uh, ideally pg_upgrade would be able to detect every possible case of >restore failure, but unfortunately it can't. It does look through >pg_proc and check that all shared object files referenced exist in the >new cluster. What it does not check, as you have seen, is for >dictionary files. > >I looked at at how hard it would be to check for text search dictionary >files, and it looks hard. The file specification is stored in an SQL >text string: > >test=3D> SELECT dictinitoption FROM pg_ts_dict; > dictinitoption >------------------------------------------------------------------ > > dictfile =3D 'mythesaurus', dictionary =3D 'pg_catalog.english_stem' > >pg_upgrade would need to parse that string, then add a .ths extension to >the name, as specified here: > >./backend/tsearch/dict_thesaurus.c: >filename =3D get_tsearch_config_filename(filename, "ths"); > >I don't see how this could be done easily, and yours is the first report >of this problem. I am happy that the debugging log files allowed you to >find the cause and complete the upgrade successfully. > >I could document this limitation. > >-- > Bruce Momjian http://momjian.us > EnterpriseDB http://enterprisedb.com > > + Everyone has their own god. + This electronic transmission is confidential and intended solely for the ad= dressee(s). If you are not an intended addressee, do not disclose, copy or = take any other action in reliance on this transmission. If you have receive= d this transmission in error, please delete it from your system and notify = CoverMyMeds LLC at privacy@covermymeds.com. Thank you. --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs