Re: Autovacuum analyze can't find C based function

From: Noah Misch <noah(at)leadboat(dot)com>
To: Thomas Butz <tbutz(at)optitool(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Autovacuum analyze can't find C based function
Date: 2018-08-27 04:13:17
Message-ID: 20180827041317.GA1236401@rfd.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Jul 19, 2018 at 10:29:27AM +0200, Thomas Butz wrote:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> > In recent PG releases, autovacuum executes stuff under a restrictive
> > search_path setting (just pg_catalog, in fact).
>
> This should probably be added to section 24.1. of the documentation. At least i couldn't find it elsewhere.

That wouldn't be unreasonable, but I think it's too much detail for the
documentation. What I'd find more promising is to refine the HINT to react
when the function exists in a schema outside search_path. Perhaps it would
then say "HINT: No function matches the given name, but other schemas have
functions of that name. You might need to schema-qualify the function name."
(I don't plan to implement that myself.)

> > or add a "SET search_path" clause to the function
> >definition.
>
> Could you elaborate a bit more on this? It seems like this would only limit/change which objects should be accessed
> within the function as described by the CREATE FUNCTION documentation. The function itself wouldn't still be picked
> up by the autovacuum daemon or am i missing something?

Based on the error you posted, you would add the "SET search_path" clause to
function public.make_standard_name(text). Autovacuum did find
public.make_standard_name(text), but it did not find the transliteration(text)
function called inside the body of public.make_standard_name(text).

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Kapila 2018-08-27 05:54:40 Re: Re: Re: Re: Bug: ERROR: invalid cache ID: 42 CONTEXT: parallel worker
Previous Message jimmy 2018-08-27 02:35:52 Re:Re: Re: Re: Bug: ERROR: invalid cache ID: 42 CONTEXT: parallel worker