Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lOkD2-0006kI-Uo for pgsql-general@arkaria.postgresql.org; Tue, 23 Mar 2021 16:48:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lOkD1-0001Iz-Te for pgsql-general@arkaria.postgresql.org; Tue, 23 Mar 2021 16:48:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lOjZ9-00025q-Ul for pgsql-general@lists.postgresql.org; Tue, 23 Mar 2021 16:07:36 +0000 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lOjZ4-0006xN-VQ for pgsql-general@lists.postgresql.org; Tue, 23 Mar 2021 16:07:35 +0000 Received: by mail-lf1-x134.google.com with SMTP id n138so27435636lfa.3 for ; Tue, 23 Mar 2021 09:07:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cifrasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:organization:message-id:to:cc:subject:in-reply-to :references:mime-version:content-transfer-encoding; bh=5nj+5SkmLqj6crak+OweYe8CE7uL9Af/rRY5TGSVXAs=; b=OaSQAnbJxznFTOgKVUgb8f7VcnVALe1ElIdo+v6sr6i2XUDItB2lc27nog+tEYCU+L cRGXbh9/GxSDFQLDVPLYE2eZekvFIPVbP8R0Wx1InFpOC/ivwOu5Wd85XejSQIg22s34 dKhKnoULIo7D4gU5hpALuN6Wj+leVWNAqNfqqryv/EgMwy3/Ffg1J9t0FWLkGTAUyaHZ x05AAhFgGlKaTi27jVBL3bu0CSyUdGuYWe2Tvz/3rO29fU2vDAZac2kYeQvS5FvDBvsx Z6d6FeqBGQLCkyJs/LaFoe+1+hfSGnwdgzSYwMBcGKfBq5q/RVXj86y3xuSOyDcyofYH bnHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:organization:message-id:to:cc:subject :in-reply-to:references:mime-version:content-transfer-encoding; bh=5nj+5SkmLqj6crak+OweYe8CE7uL9Af/rRY5TGSVXAs=; b=j9gqxqXB2wpeQDRjGaoMCWtxGCn7QyJRnv9LUyqKxmpQEb6EOo0xzHgGBqmbahXUPo gwemM/65OcVP8qY7jzbsSBPVtbjDXxc7BQ7S9XzE1ogZwYA4ae2djPyf70EF45kPWph9 124MJl97/VlH7Ai8XqdygYMOEvnFhxpIJkvvNKrjYXu0axFh2o+/D1KP6GJuiVpGAXsL 1THdkSBNIKwM8H9olqhwZajRtBR0Le0fsyZiTGHtadAdZqLVoEDSqmLcqp9AMqmNS3bo KJTq1p/1cE+tIx/fSUjVIOz5apfg5Vnf4qrgw3B8jHBUPpIQniPmf4MpX5ZtLmADUOJM rIkw== X-Gm-Message-State: AOAM533t7ouyQzUiq71HxDJ19Ckujz9Nd1LUmGA8ZwuBZITWe6zyiBjy irlD600ylTWAdKU647w50PoyLA== X-Google-Smtp-Source: ABdhPJyeTfSQSneFlOH372l80vmb5PynF+4k+o6UeLyAAKgrkZDySWonNUjQqIR+jkkZhBqrYdV4oQ== X-Received: by 2002:a05:6512:51c:: with SMTP id o28mr3153578lfb.237.1616515649646; Tue, 23 Mar 2021 09:07:29 -0700 (PDT) Received: from [192.168.67.81] ([84.201.247.191]) by smtp.gmail.com with ESMTPSA id d8sm2385589ljc.129.2021.03.23.09.07.28 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 23 Mar 2021 09:07:29 -0700 (PDT) Date: Tue, 23 Mar 2021 20:07:28 +0400 From: =?utf-8?B?0JDQvdC00YDQtdC5INCh0YvRh9GR0LI=?= Organization: =?utf-8?B?0J7QntCeICLQptC40YTRgNCw0YHQvtGE0YIi?= X-Priority: 3 (Normal) Message-ID: <18310311052.20210323200728@cifrasoft.com> To: Adrian Klaver CC: pgsql-general@lists.postgresql.org Subject: Re: No enough privileges for autovacuum worker In-Reply-To: References: <1224144510.20210323142019@cifrasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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".