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: Thu, 25 Mar 2021 12:25:37 +0400
Message-ID: <1886471445.20210325122537@cifrasoft.com> (raw)
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>

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.






view thread (12+ messages)  latest in thread

Message-ID: <1886471445.20210325122537@cifrasoft.com>
Permalink:  ../1886471445.20210325122537@cifrasoft.com/
Also on:    postgresql.org/message-id/1886471445.20210325122537@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: <1886471445.20210325122537@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> <87e40ae6-efa8-f930-55e1-cceab4d1d63a@aklaver.com> <1886471445.20210325122537@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