Re: No enough privileges for autovacuum worker

From: Андрей Сычёв <andrey(dot)sychev(at)cifrasoft(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: No enough privileges for autovacuum worker
Date: 2021-03-25 08:25:37
Message-ID: 1886471445.20210325122537@cifrasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2021-03-25 14:57:27 Re: No enough privileges for autovacuum worker
Previous Message Laurenz Albe 2021-03-25 04:11:55 Re: Enterprise Active Directory Authentication?