From: CJ Estel <CEstel@covermymeds.com>
To: Bruce Momjian <bruce@momjian.us>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #13042: pg_upgrade --check succeeded but run failed due to missing thesaurus file
Date: Thu, 16 Apr 2015 14:23:54 +0000
Message-ID: <D1553A8A.11067%cestel@covermymeds.com> (raw)
In-Reply-To: <20150416010134.GA1672@momjian.us>
References: <20150413151005.2527.42400@wrigleys.postgresql.org>
<20150416010134.GA1672@momjian.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
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" <bruce@momjian.us> 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 = "pg_catalog"."thesaurus",
>> dictfile = '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=> SELECT dictinitoption FROM pg_ts_dict;
> dictinitoption
>------------------------------------------------------------------
>
> dictfile = 'mythesaurus', dictionary = '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 = 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 <bruce@momjian.us> http://momjian.us
> EnterpriseDB http://enterprisedb.com
>
> + Everyone has their own god. +
This electronic transmission is confidential and intended solely for the addressee(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 received this transmission in error, please delete it from your system and notify CoverMyMeds LLC at privacy@covermymeds.com. Thank you.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: CEstel@covermymeds.com, bruce@momjian.us
Subject: Re: BUG #13042: pg_upgrade --check succeeded but run failed due to missing thesaurus file
In-Reply-To: <D1553A8A.11067%cestel@covermymeds.com>
References: <20150413151005.2527.42400@wrigleys.postgresql.org> <20150416010134.GA1672@momjian.us> <D1553A8A.11067%cestel@covermymeds.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox