Privilege error with c functions during postgresql upgrade from 11 -> 13 - Mailing list pgsql-general
From | Dives, Chloe |
---|---|
Subject | Privilege error with c functions during postgresql upgrade from 11 -> 13 |
Date | |
Msg-id | AM8PR09MB5384B6AF7C3CD36B44E55C3CF0FA9@AM8PR09MB5384.eurprd09.prod.outlook.com Whole thread Raw |
Responses |
Re: Privilege error with c functions during postgresql upgrade from 11 -> 13
|
List | pgsql-general |
I am doing a test run of upgrading a postgresql instance from v11 to v13 and am hitting the following error:
pg_restore: while PROCESSING TOC:
pg_restore: from TOC entry 13902; 0 0 ACL FUNCTION "bt_index_check"("index" "regclass") rolename1
pg_restore: error: could not execute query: ERROR: role "16416" does not exist
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";
GRANT ALL ON FUNCTION "public"."bt_index_check"("index" "regclass") TO "rolename1";
GRANT ALL ON FUNCTION "public"."bt_index_check"("index" "regclass") TO "rolename2";
This role does not appear to exist in the database, and I suspect that id belonged to one of the dbadmin team who has recently left. I was also hitting this same error for pg_buffercache_pages() as well. They are both c functions stored in libdir.
Can anyone point me towards where pg_dump is getting these outdated permissions from please?
Thanks!
pgsql-general by date: