Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 28E907C833C for ; Fri, 15 Jun 2012 23:28:18 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SfikI-0002HA-7P for pgsql-bugs@postgresql.org; Sat, 16 Jun 2012 02:28:17 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q5G2Rxvk009045; Fri, 15 Jun 2012 22:27:59 -0400 (EDT) From: Tom Lane To: Bruce Momjian cc: Daniele Varrazzo , pgsql-bugs@postgresql.org Subject: Re: pg_upgrade fails with missing FTS resources In-reply-to: <20120616011647.GA26006@momjian.us> References: <20120616011647.GA26006@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Fri, 15 Jun 2012 21:16:47 -0400" Date: Fri, 15 Jun 2012 22:27:59 -0400 Message-ID: <9044.1339813679@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201206/150 X-Sequence-Number: 33377 Bruce Momjian writes: > On Fri, Jun 15, 2012 at 04:15:57PM +0100, Daniele Varrazzo wrote: >> pg_upgrade fails on missing FTS dictionaries requiring external files. >> --check fails to detect the incompatibility. > Sure, we can test for that. What system column stores these file names? Trying to check that on the basis of the system catalog entries seems quite hopeless. What's in the catalogs is essentially what appears in the CREATE command, ie dictfile = 'italian_ispell', afffile = 'italian_ispell', stopwords = 'italian_ispell' The dictionary template knows which of these options are file names and which are not, and what filename extension to apply to each option that is a file name; but you don't. The closest that I think pg_upgrade could reasonably come is to compare the contents of the old and new installations' tsearch_data/ directories, and complain about any files present in the former and not the latter. However, that method seems fraught with opportunities for false positives: in particular you might complain about some file that was in the old installation but not actually referenced by any text search catalog entry. In the end I'm not sure it's worth it. There are any number of ways that the restore step can fail, and it's impossible for pg_upgrade to pre-check for all of them. regards, tom lane