Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YivCF-0007BL-SX for pgsql-bugs@arkaria.postgresql.org; Fri, 17 Apr 2015 01:35:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YivCF-0006Af-4L for pgsql-bugs@arkaria.postgresql.org; Fri, 17 Apr 2015 01:35:55 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YivCE-0006AY-0s for pgsql-bugs@postgresql.org; Fri, 17 Apr 2015 01:35:54 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YivC8-0000iz-NW for pgsql-bugs@postgresql.org; Fri, 17 Apr 2015 01:35:51 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1YivC7-0002Pd-H8; Thu, 16 Apr 2015 21:35:47 -0400 Date: Thu, 16 Apr 2015 21:35:47 -0400 From: Bruce Momjian To: CJ Estel Cc: "pgsql-bugs@postgresql.org" Subject: Re: BUG #13042: pg_upgrade --check succeeded but run failed due to missing thesaurus file Message-ID: <20150417013547.GA1868@momjian.us> References: <20150413151005.2527.42400@wrigleys.postgresql.org> <20150416010134.GA1672@momjian.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="azLHFNyN32YCQGCU" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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 --azLHFNyN32YCQGCU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + --azLHFNyN32YCQGCU Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="pg_upgrade.diff" diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgml new file mode 100644 index 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 contrib or some other source. Do not install the schema definitions, e.g. 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. --azLHFNyN32YCQGCU Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs --azLHFNyN32YCQGCU--