From: Bruce Momjian <bruce@momjian.us>
To: CJ Estel <CEstel@covermymeds.com>
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 21:35:47 -0400
Message-ID: <20150417013547.GA1868@momjian.us> (raw)
In-Reply-To: <D1553A8A.11067%cestel@covermymeds.com>
References: <20150413151005.2527.42400@wrigleys.postgresql.org>
<20150416010134.GA1672@momjian.us>
<D1553A8A.11067%cestel@covermymeds.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On Thu, Apr 16, 2015 at 02:23:54PM +0000, CJ Estel wrote:
> 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.
I have developed the attached documentation patch that I have applied to
head and 9.4.
I looked into issuing some kind of warning from pg_upgrade, but it is
hard to do. Not only can you have thesaurus files, but also
dictionaries, synonyms, and stop word files. pg_upgrade would have to
know how to parse the pg_ts_dict.dictinitoption string, pick out each of
these, know the expected file extension, and check for its existence ---
That seems too invasive for pg_upgrade to do.
One idea would be to write a server-side function that parses that field
and returns all referenced file names, and pg_upgrade can call that on
the old server then check those on the new server. I am not sure it is
worth it, but if someone writes it, I can have pg_upgrade use it. The
big problem there is that you have to run that function on the old
server, so it is hard to see how that will help with a 9.5 upgrade ---
it would only work for upgrades where 9.5 is the _old_ version. Also,
we don't have any easy way to backpatch system catalog changes like
adding a new function.
Another idea I had was to do a directory listing of old cluster's
share/tsearch_data and compare that to the new server, but if we ever
add files to share/tsearch_data in a major release, pg_upgrade would
fail with no way for users to fix it, so that seems bad.
Anyway, the doc fix is there and if anyone has better ideas, I am all
ears.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugsAttachments:pg_upgrade.diff (text/x-diff, 676B) downloaddiff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgmlnew file mode 100644index ce5e308..e97fb48
*** a/doc/src/sgml/ref/pgupgrade.sgml
--- b/doc/src/sgml/ref/pgupgrade.sgml
*************** make prefix=/usr/local/pgsql.new install
*** 274,279 ****
--- 274,281 ----
whether they are from <filename>contrib</filename>
or some other source. Do not install the schema definitions, e.g.
<filename>pgcrypto.sql</>, because these will be upgraded from the old cluster.
+ Also, any custom full text search files (dictionary, synonym,+ thesaurus, stop words) must also be copied to the new cluster.
</para>
</step>
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: bruce@momjian.us, CEstel@covermymeds.com
Subject: Re: BUG #13042: pg_upgrade --check succeeded but run failed due to missing thesaurus file
In-Reply-To: <20150417013547.GA1868@momjian.us>
References: <20150413151005.2527.42400@wrigleys.postgresql.org> <20150416010134.GA1672@momjian.us> <D1553A8A.11067%cestel@covermymeds.com> <20150417013547.GA1868@momjian.us>
* 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