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 1ffmvs-00049x-A7 for pgsql-bugs@arkaria.postgresql.org; Wed, 18 Jul 2018 13:55:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ffmvq-0008Hk-Ln for pgsql-bugs@arkaria.postgresql.org; Wed, 18 Jul 2018 13:55:54 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ffmvq-0008HY-CE for pgsql-bugs@lists.postgresql.org; Wed, 18 Jul 2018 13:55:54 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ffmvm-0006HF-G6 for pgsql-bugs@postgresql.org; Wed, 18 Jul 2018 13:55:53 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w6IDtk8o008573; Wed, 18 Jul 2018 09:55:46 -0400 From: Tom Lane To: Thomas Butz cc: pgsql-bugs@postgresql.org Subject: Re: Autovacuum analyze can't find C based function In-reply-to: <2118571382.49.1531905290326.JavaMail.tbutz@BART> References: <2118571382.49.1531905290326.JavaMail.tbutz@BART> Comments: In-reply-to Thomas Butz message dated "Wed, 18 Jul 2018 11:14:55 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <8571.1531922146.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 18 Jul 2018 09:55:46 -0400 Message-ID: <8572.1531922146@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thomas Butz writes: > While installing Nominatim(OSM geocoding service) I stumbled upon this i= ssue: https://github.com/openstreetmap/Nominatim/issues/1097#issue-3417999= 19 > The function "transliteration" has been properly created during the inst= allation processes according to the following template: > https://github.com/openstreetmap/Nominatim/blob/v3.1.0/sql/functions.sql= #L25 > The strange thing is that i'm able to execute the function while backgro= und analyzation of the table "placex" repeatedly fails with the following = error: > 2018-07-17 06:59:35.908 UTC [30641] ERROR: function transliteration(tex= t) does not exist at character 23 In recent PG releases, autovacuum executes stuff under a restrictive search_path setting (just pg_catalog, in fact). So you need to do something explicit to reference stuff in other schemas; either schema qualify the name, or add a "SET search_path" clause to the function definition. This is good practice anyway: what you're seeing is that this function fails with any search_path other than the one you use by default. regards, tom lane