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 1lPLJO-0000pY-Ii for pgsql-general@arkaria.postgresql.org; Thu, 25 Mar 2021 08:25:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lPLJN-0002nn-Hv for pgsql-general@arkaria.postgresql.org; Thu, 25 Mar 2021 08:25:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lPLJN-0002ng-6R for pgsql-general@lists.postgresql.org; Thu, 25 Mar 2021 08:25:49 +0000 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lPLJG-0006Oy-2F for pgsql-general@lists.postgresql.org; Thu, 25 Mar 2021 08:25:48 +0000 Received: by mail-lf1-x134.google.com with SMTP id i26so1283301lfl.1 for ; Thu, 25 Mar 2021 01:25:41 -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=mFzEd9mOK92ylKjKq3hpQuKT0jmDOz9VoodHYPizlBE=; b=KQ+R8LPdIcdQ51daZmSagL3YtxzzkP0M2gnyuDOjOZjp65VCVXVs4mtl9MUUjaVt8I X1o5oEzyPqst8bhuL0+nWOWTKdJjWkNKwKQ4d0vOOr9P12Sihvzq4X6THZpAO7nDlXIA J5dTIKIKB5nfHT+OUfZKvvySBHhgt5leBq2H3XWjG1nXbP1GgAPMW750XoVlZd0Rm/X2 MEJWb0/2sTRp2df8uOP2JwzyPKXTngat1OZWiZmFUVCjC8WPUs8ccFFE+T1GizqVxagA ZvE8j7NsR9g+500id48UC4n5jq215kxFh4JrXqKUM4blxQ6qKt4tX7sDnn27Yjrlb4H2 UMtg== 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=mFzEd9mOK92ylKjKq3hpQuKT0jmDOz9VoodHYPizlBE=; b=UnrN2tjcy8TToBf3fY8XyAA7MCCT1r3wfoRi4ZpjHeCzOsMh7q3OUZuVF7axxUZe0g /bYhuJDeot1kii7lOnEPLt4Yb8tfI+Pj3dsfKayq/RKL17PpwSYOVNJG1GzbIfIe0ubi mH4y/x0vGa9tfCvqyTjGFeYZEyzrUblVg9tTCiAL2Ogu3LWskd8uthnsakaXejTxijq4 7wDrxzszplzFdT8bE5vKmEn88ocgjGvMIqxIjNkPDXUlzjug7jb77JusYs4SqE7gt2mB QQNZ+ci5W0eSkGPs/eJ/gnv0vly8zvPyXAd+uR1z2xx4VHiIclf6icR2F/Qeg0jPlZCC aghA== X-Gm-Message-State: AOAM533SSEIJoQ7F7+NGjnyc6pKjjVtyYjWwrKon3w7oWFhk/CriA95r wmf4aLIAD/5icprzce8ig1tNjNGuAbuI9g== X-Google-Smtp-Source: ABdhPJyFJknra3o3A6cyCZ7hBculvi0T5FU1yQSWDrYvrfgKCBP8YifxJDjQGh3dPCoMjCurK5nmbw== X-Received: by 2002:a19:7504:: with SMTP id y4mr4236440lfe.616.1616660739341; Thu, 25 Mar 2021 01:25:39 -0700 (PDT) Received: from [192.168.67.81] ([84.201.247.191]) by smtp.gmail.com with ESMTPSA id u4sm458972lfb.98.2021.03.25.01.25.38 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 25 Mar 2021 01:25:38 -0700 (PDT) Date: Thu, 25 Mar 2021 12:25:37 +0400 From: =?utf-8?B?0JDQvdC00YDQtdC5INCh0YvRh9GR0LI=?= Organization: =?utf-8?B?0J7QntCeICLQptC40YTRgNCw0YHQvtGE0YIi?= X-Priority: 3 (Normal) Message-ID: <1886471445.20210325122537@cifrasoft.com> To: Adrian Klaver CC: pgsql-general@lists.postgresql.org Subject: Re: No enough privileges for autovacuum worker In-Reply-To: <87e40ae6-efa8-f930-55e1-cceab4d1d63a@aklaver.com> References: <1224144510.20210323142019@cifrasoft.com> <18310311052.20210323200728@cifrasoft.com> <1723387856.20210323201857@cifrasoft.com> <56104bce-d461-1fa2-8c8d-96dd4a13ba92@aklaver.com> <913296991.20210323204551@cifrasoft.com> <3510602133.20210324121638@cifrasoft.com> <87e40ae6-efa8-f930-55e1-cceab4d1d63a@aklaver.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 Because in trigger where table fpbackup.fp_vpn_data_2021w12 has been created there are several DDL commands: EXECUTE 'CREATE TABLE "' || fp_schema_name || '"."' || fp_table_name || '" (LIKE '|| fp_parent_table_name || ' INCLUDING DEFAULTS INCLUDING CONSTRAINTS INCLUDING INDEXES) WITHOUT OIDS TABLESPACE ' || fp_tablespace; EXECUTE 'ALTER TABLE "' || fp_schema_name || '"."' || fp_table_name || '" OWNER TO fpbkwriter'; The trigger was called by user "worker" that already had permission on USAGE of schema dict, so table creation was successful. But after that the ownership of the table was moving to "fpbkwriter" that had no permission on USAGE of schema dict, thus the error occured. In reality, there was no user "fpbkwriter" at the beginning. Only user "worker" was created. And when the user "fpbkwriter" was created, he was not granted by enough privileges mistakenly.