pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Андрей Сычёв <andrey.sychev@cifrasoft.com>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: No enough privileges for autovacuum worker
Date: Tue, 23 Mar 2021 20:07:28 +0400
Message-ID: <18310311052.20210323200728@cifrasoft.com> (raw)
In-Reply-To: <dfa9e41a-633b-0b02-2c17-75e05da300e8@aklaver.com>
References: <1224144510.20210323142019@cifrasoft.com>
	<dfa9e41a-633b-0b02-2c17-75e05da300e8@aklaver.com>


Definition for the table fpbackup.fp_vpn_data_2021w12:

CREATE TABLE fpbackup.fp_vpn_data_2021w12 (
        id int8 NOT NULL DEFAULT nextval('fp_vpn_data_id_seq'::regclass),
        fp_date_start timestamp NOT NULL,
        fp_date_end timestamp NOT NULL,
        ....
        fp_host varchar NOT NULL,
        ....
        CONSTRAINT c_d_fp_vpn_data_2021w12 CHECK (((fp_date_start >= '2021-03-19 00:00:00'::timestamp without time zone) AND (fp_date_start < '2021-03-26 00:00:00'::timestamp without time zone))),
        CONSTRAINT fp_vpn_data_2021w12_pkey PRIMARY KEY (id)
)
INHERITS (public.fp_vpn_data)
TABLESPACE myts4
;
CREATE INDEX fp_vpn_data_2021w12_fp_host_idx ON fpbackup.fp_vpn_data_2021w12 USING btree (fp_host);
CREATE INDEX fp_vpn_data_2021w12_trigrams_vector_idx ON fpbackup.fp_vpn_data_2021w12 USING gin (dict.trigrams_vector((fp_host)::text));

------------------------

Definition for the function dict.trigrams_array:

CREATE OR REPLACE FUNCTION dict.trigrams_array(word text)
 RETURNS text[]
 LANGUAGE plpgsql
 IMMUTABLE STRICT
AS $function$
        DECLARE
                result text[];
        BEGIN
                FOR i IN 1 .. length(word) - 2 LOOP
                        result := result || quote_literal(substr(lower(word), i, 3));
                END LOOP;

                RETURN result;
        END;
$function$
;

------------------------

I  do not know exactly what user the function running as is because it
is implicit call.

I  know that records in table the dict.trigrams_array are inserted by user
"worker".

Owner of the table fpbackup.fp_vpn_data_2021w12 is user "fpbkwriter".

user "worker" and "fpbkwriter" have the following permissions:

GRANT USAGE
ON SCHEMA
dict
TO worker;

GRANT EXECUTE
ON ALL FUNCTIONS IN SCHEMA
dict
TO worker;

GRANT fpbkwriter TO worker GRANTED BY postgres;

GRANT USAGE, CREATE
ON SCHEMA
fpbackup
TO fpbkwriter;

The  user  "fpbkwriter" does not have any privileges related to schema
"dict".






view thread (12+ messages)  latest in thread

Message-ID: <18310311052.20210323200728@cifrasoft.com>
Permalink:  ../18310311052.20210323200728@cifrasoft.com/
Also on:    postgresql.org/message-id/18310311052.20210323200728@cifrasoft.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: andrey.sychev@cifrasoft.com, adrian.klaver@aklaver.com
  Subject: Re: No enough privileges for autovacuum worker
  In-Reply-To: <18310311052.20210323200728@cifrasoft.com>
  References: <1224144510.20210323142019@cifrasoft.com> <dfa9e41a-633b-0b02-2c17-75e05da300e8@aklaver.com> <18310311052.20210323200728@cifrasoft.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