pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Dives, Chloe <Chloe.Dives@gam.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Privilege error with c functions during postgresql upgrade from 11 -> 13
Date: Thu, 28 Apr 2022 09:52:51 -0700
Message-ID: <a7b43839-e8a9-7df6-4aeb-6fb5e58fab92@aklaver.com> (raw)
In-Reply-To: <AM8PR09MB53849527DC89C61DF528DD11F0FD9@AM8PR09MB5384.eurprd09.prod.outlook.com>
References: <AM8PR09MB5384B6AF7C3CD36B44E55C3CF0FA9@AM8PR09MB5384.eurprd09.prod.outlook.com>
	<2a9ac618-5d42-5f41-e93d-21667f094b56@aklaver.com>
	<AM8PR09MB53849527DC89C61DF528DD11F0FD9@AM8PR09MB5384.eurprd09.prod.outlook.com>

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





view thread (4+ messages)

Message-ID: <a7b43839-e8a9-7df6-4aeb-6fb5e58fab92@aklaver.com>
Permalink:  ../a7b43839-e8a9-7df6-4aeb-6fb5e58fab92@aklaver.com/
Also on:    postgresql.org/message-id/a7b43839-e8a9-7df6-4aeb-6fb5e58fab92@aklaver.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: adrian.klaver@aklaver.com, Chloe.Dives@gam.com
  Subject: Re: Privilege error with c functions during postgresql upgrade from 11 -> 13
  In-Reply-To: <a7b43839-e8a9-7df6-4aeb-6fb5e58fab92@aklaver.com>
  References: <AM8PR09MB5384B6AF7C3CD36B44E55C3CF0FA9@AM8PR09MB5384.eurprd09.prod.outlook.com> <2a9ac618-5d42-5f41-e93d-21667f094b56@aklaver.com> <AM8PR09MB53849527DC89C61DF528DD11F0FD9@AM8PR09MB5384.eurprd09.prod.outlook.com> <a7b43839-e8a9-7df6-4aeb-6fb5e58fab92@aklaver.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