Re: Privilege error with c functions during postgresql upgrade from 11 -> 13 - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Privilege error with c functions during postgresql upgrade from 11 -> 13
Date
Msg-id a7b43839-e8a9-7df6-4aeb-6fb5e58fab92@aklaver.com
Whole thread Raw
In response to RE: Privilege error with c functions during postgresql upgrade from 11 -> 13  ("Dives, Chloe" <Chloe.Dives@gam.com>)
List pgsql-general
On 4/28/22 02:08, Dives, Chloe wrote:
> Thanks for your reply. I am using pg_upgrade to do the upgrade

In the Postgres 11 instance using psql what does:

\df+ bt_index_check

return.

In particular under the Access privileges column.

Also the output of:

\du

Going back to your original post, someone who is more familiar with 
pg_upgrade maybe can explain:

Command was: SELECT pg_catalog.binary_upgrade_set_record_init_privs(true);
REVOKE ALL ON FUNCTION "public"."bt_index_check"("index" "regclass") 
FROM PUBLIC;
REVOKE ALL ON FUNCTION "public"."bt_index_check"("index" "regclass") 
FROM "rolename1";
SET SESSION AUTHORIZATION "16416";
GRANT ALL ON FUNCTION "public"."bt_index_check"("index" "regclass") TO 
"16416";
RESET SESSION AUTHORIZATION;
SELECT pg_catalog.binary_upgrade_set_record_init_privs(false);
REVOKE ALL ON FUNCTION "public"."bt_index_check"("index" "regclass") 
FROM "16416";

In other words why the role 16416 was GRANTed ALL then REVOKEd ALL on 
the function?




-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Backing up a DB excluding certain tables
Next
From: JORGE MALDONADO
Date:
Subject: Re: Backing up a DB excluding certain tables