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 1lPRQb-0005Tq-FV for pgsql-general@arkaria.postgresql.org; Thu, 25 Mar 2021 14:57:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lPRQZ-0003I3-CW for pgsql-general@arkaria.postgresql.org; Thu, 25 Mar 2021 14:57:39 +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 1lPRQX-0003HD-Ux for pgsql-general@lists.postgresql.org; Thu, 25 Mar 2021 14:57:39 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lPRQS-0005VN-0h for pgsql-general@lists.postgresql.org; Thu, 25 Mar 2021 14:57:37 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 600795C019A; Thu, 25 Mar 2021 10:57:29 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 25 Mar 2021 10:57:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=i Q8eobAsz5ITlChYwsdHdtxn5Jz+hwB9hdjx68ge9ik=; b=c7wMybGU6THnKimSy Vp0zHzhNZi9jPUNWq2QRT06sEsQuBD5a1AncDmvBkxaHYCV8jkdcPk/fjmidE+Nm LkKl8cJ8Ii55durksNqhldQD+Q44OEeLrJp8ZaqI2T4qKLpLfpnNE1tBqdcFskDR lcOLzfnF8e3lQ2xAKBGVpCXrVIn4AB+BS3ecrJHBPC/SPS9mNhjWwh9RAp7IVhRn j6C9pQczcIxEIyScrc8cTI8oPNOUdzOdM2wEqLPCgNwKW5qxh9X6U/SqzFZWzBPm MXfwbFZm01JRsw1gAeLwuWplH1WuNE7+wJVNa6R9cliwTFXoKyTCkAtG+5UeRyAa w19+Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=iQ8eobAsz5ITlChYwsdHdtxn5Jz+hwB9hdjx68ge9 ik=; b=sdxcdH2EM0CQptQX2le6rpR/lJGVv7ct+5vSv4AIM/6dcxxdyog+Rhvif 1PE6QgMT9J1K+JdGTnzL13V/eVeaBJv7DqhXBqPT2wLqPqIRv7GpalXEsyiNh7TL /JLgz7pf+DknnHWcrVytbw8rKwtbq3qxnwCGTRaIA1mo06gsRO0GF5gc+Xakt2KZ AYk7r+XlQgPl1PY93G35KwdRZSoH9/y+crVKdkgZmTEgBSQO6i7ZW+INfna+U4lN nAek94QY1pIJkME8zQ4bDR/EU6UiI421gEbqcPowevlIxuBPdi2Pr+vOsGNZlhVP rSeOngaLVaDNg1MWSxN00pX2tjzNw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudehtddgjeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtke ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepveevfeevfe eugeffkeekhfegieeufffgteeujedvgffhueejjefhkeejleegtdegnecukfhppeeljedr uddufedrvddujedrvdejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: from [192.168.1.4] (97-113-217-27.tukw.qwest.net [97.113.217.27]) by mail.messagingengine.com (Postfix) with ESMTPA id 413611080064; Thu, 25 Mar 2021 10:57:28 -0400 (EDT) Subject: Re: No enough privileges for autovacuum worker To: =?UTF-8?B?0JDQvdC00YDQtdC5INCh0YvRh9GR0LI=?= Cc: pgsql-general@lists.postgresql.org 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> <1886471445.20210325122537@cifrasoft.com> From: Adrian Klaver Message-ID: <9c987b8d-6690-211a-2795-d33bd0de36ef@aklaver.com> Date: Thu, 25 Mar 2021 07:57:27 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <1886471445.20210325122537@cifrasoft.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 3/25/21 1:25 AM, Андрей Сычёв wrote: > 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. > Alright that I understand. Still after the ALTER TABLE ... OWNER TO fpbkwriter, the index was running as fpbkwriter yet there where no errors? Did that mean the table was never queried or the index never used? -- Adrian Klaver adrian.klaver@aklaver.com