Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fv5ng-0004bn-U1 for pgsql-general@arkaria.postgresql.org; Wed, 29 Aug 2018 19:06:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fv5ne-0005HF-67 for pgsql-general@arkaria.postgresql.org; Wed, 29 Aug 2018 19:06:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fv5nd-0005H7-UI for pgsql-general@lists.postgresql.org; Wed, 29 Aug 2018 19:06:41 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fv5nZ-0007bX-Rw for pgsql-general@lists.postgresql.org; Wed, 29 Aug 2018 19:06:41 +0000 Received: from bruce by momjian.us with local (Exim 4.84_2) (envelope-from ) id 1fv5nX-00080D-KZ; Wed, 29 Aug 2018 15:06:35 -0400 Date: Wed, 29 Aug 2018 15:06:35 -0400 From: Bruce Momjian To: Gunnlaugur Thor Briem Cc: pgsql-general@lists.postgresql.org Subject: Re: pg_upgrade fails saying function unaccent(text) doesn't exist Message-ID: <20180829190635.GD25450@momjian.us> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Aug 29, 2018 at 06:09:53PM +0000, Gunnlaugur Thor Briem wrote: > Hi, > > I'm trying to upgrade an old PG 9.4 cluster to PG 10, and it's failing on > creating an index that uses the unaccent(text) function. > > That function is part of the unaccent extension, which is installed in the old > DB cluster. I expect pg_upgrade to create that extension as part of the > upgrade. It does create other extensions that are installed in the old DB > cluster. I don't get why this one isn't included. This is caused by security changes made in PG 10.3 and other minor releases. Please see this thread for an outline of the issue: https://www.postgresql.org/message-id/flat/152106914669.1223.5104148605998271987%40wrigleys.postgresql.org I think you have to change your index function to specify the schema name before the unacces function call, e.g. SELECT lower(public.unaccent(btrim(regexp_replace( -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +