pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Андрей Сычёв <andrey.sychev@cifrasoft.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: No enough privileges for autovacuum worker
Date: Wed, 24 Mar 2021 08:18:04 -0700
Message-ID: <87e40ae6-efa8-f930-55e1-cceab4d1d63a@aklaver.com> (raw)
In-Reply-To: <3510602133.20210324121638@cifrasoft.com>
References: <1224144510.20210323142019@cifrasoft.com>
	<dfa9e41a-633b-0b02-2c17-75e05da300e8@aklaver.com>
	<18310311052.20210323200728@cifrasoft.com>
	<f7ce0f69-e3db-c8f1-5937-8eea25566ecf@aklaver.com>
	<1723387856.20210323201857@cifrasoft.com>
	<56104bce-d461-1fa2-8c8d-96dd4a13ba92@aklaver.com>
	<913296991.20210323204551@cifrasoft.com>
	<d0f325b2-61f0-b973-98c4-338b2e604aea@aklaver.com>
	<3510602133.20210324121638@cifrasoft.com>

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@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@fpdb] STATEMENT:  ANALYZE fpbackup.fp_vpn_data_2021w12
> [31203]-[]-[]-[autovacuum worker]-[42501]-[@] ERROR:  permission denied for schema dict at character 34
> [31203]-[]-[]-[autovacuum worker]-[42501]-[@] 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.klaver@aklaver.com





view thread (12+ messages)  latest in thread

Message-ID: <87e40ae6-efa8-f930-55e1-cceab4d1d63a@aklaver.com>
Permalink:  ../87e40ae6-efa8-f930-55e1-cceab4d1d63a@aklaver.com/
Also on:    postgresql.org/message-id/87e40ae6-efa8-f930-55e1-cceab4d1d63a@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, andrey.sychev@cifrasoft.com
  Subject: Re: No enough privileges for autovacuum worker
  In-Reply-To: <87e40ae6-efa8-f930-55e1-cceab4d1d63a@aklaver.com>
  References: <1224144510.20210323142019@cifrasoft.com> <dfa9e41a-633b-0b02-2c17-75e05da300e8@aklaver.com> <18310311052.20210323200728@cifrasoft.com> <f7ce0f69-e3db-c8f1-5937-8eea25566ecf@aklaver.com> <1723387856.20210323201857@cifrasoft.com> <56104bce-d461-1fa2-8c8d-96dd4a13ba92@aklaver.com> <913296991.20210323204551@cifrasoft.com> <d0f325b2-61f0-b973-98c4-338b2e604aea@aklaver.com> <3510602133.20210324121638@cifrasoft.com> <87e40ae6-efa8-f930-55e1-cceab4d1d63a@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox