Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lXRzs-0002s2-Tp for pgsql-general@arkaria.postgresql.org; Fri, 16 Apr 2021 17:11:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lXRzr-0002Zc-OL for pgsql-general@arkaria.postgresql.org; Fri, 16 Apr 2021 17:11:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lXRzr-0002ZV-G9 for pgsql-general@lists.postgresql.org; Fri, 16 Apr 2021 17:11:11 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lXRzp-0006Kd-E3 for pgsql-general@lists.postgresql.org; Fri, 16 Apr 2021 17:11:10 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 13GHB7994164753; Fri, 16 Apr 2021 13:11:08 -0400 From: Tom Lane To: greg1457 cc: "pgsql-general@lists.postgresql.org" Subject: Re: vaccumdb fails saying function unaccent(text) doesn't exist In-reply-to: References: Comments: In-reply-to greg1457 message dated "Fri, 16 Apr 2021 15:30:12 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4164751.1618593067.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 16 Apr 2021 13:11:07 -0400 Message-ID: <4164752.1618593067@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk greg1457 writes: > I migrated an postgresql instance from 9.5.4 to 9.5.21. > Unaccent extension is installed in the database, in "application" schema= . > Since this migration, when i do a vaccumdb, i obtain an error : > vacuumdb: vacuuming of database "application" failed: ERROR: function un= accent(text) does not exist > LINE 2: SELECT lower(unaccent($1)); This is probably a search_path problem. You've got an index expression somewhere with a SQL function that is not being careful about which schema(s) to look for "unaccent()" in. There were security fixes to restrict the search path that VACUUM/ANALYZE runs with, which breaks functions that aren't careful about that. regards, tom lane