Re: No enough privileges for autovacuum worker

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Андрей Сычёв <andrey(dot)sychev(at)cifrasoft(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: No enough privileges for autovacuum worker
Date: 2021-03-24 15:18:04
Message-ID: 87e40ae6-efa8-f930-55e1-cceab4d1d63a@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 3/24/21 1:16 AM, Андрей Сычёв wrote:
> I finally figured out how to tackle the problem:
>
> 1. When I manually execute ANALYZE on the table the error remains:
>
> [34938]-[192.168.67.81]-[DBeaver 7.3.2 - SQLEditor <Script-2.sql>]-[client backend]-[42501]-[postgres(at)fpdb] CONTEXT: SQL function "trigrams_vector" during inlining
> [34938]-[192.168.67.81]-[DBeaver 7.3.2 - SQLEditor <Script-2.sql>]-[client backend]-[42501]-[postgres(at)fpdb] STATEMENT: ANALYZE fpbackup.fp_vpn_data_2021w12
> [31203]-[]-[]-[autovacuum worker]-[42501]-[(at)] ERROR: permission denied for schema dict at character 34
> [31203]-[]-[]-[autovacuum worker]-[42501]-[(at)] QUERY:
> _to_string(dict.trigrams_array($1), ' ')::tsvector;
>
> This happens despite I run this query as superuser. But the hint from you
> allows me to manually reproduce error.
>
> 2. As I wrote before the owner of the table
> fpbackup.fp_vpn_data_2021w12 is "fpbkwriter"
> so I run the following query:
>
> GRANT USAGE
> ON SCHEMA
> dict
> TO fpbkwriter;
>
> and after that the problem has been solved.

Hmm. I wonder why the error did not occur when the index was created or
used?

>
> 3. The following queries do not affect the problem:
>
> GRANT EXECUTE
> ON ALL FUNCTIONS IN SCHEMA
> dict
> TO fpbkwriter;
>
> REVOKE EXECUTE
> ON ALL FUNCTIONS IN SCHEMA
> dict
> FROM fpbkwriter;
>
> --
>
> Adrian, thank you very much for support.
>
> Your hints were very useful.
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2021-03-24 16:09:32 Re: ERROR: could not attach to dynamic shared area
Previous Message Marc Millas 2021-03-24 14:41:45 Re: need clarification on CTE/join