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 2a9ac618-5d42-5f41-e93d-21667f094b56@aklaver.com
Whole thread Raw
In response to Privilege error with c functions during postgresql upgrade from 11 -> 13  ("Dives, Chloe" <Chloe.Dives@gam.com>)
Responses RE: Privilege error with c functions during postgresql upgrade from 11 -> 13  ("Dives, Chloe" <Chloe.Dives@gam.com>)
List pgsql-general
On 4/27/22 7:51 AM, Dives, Chloe wrote:
> 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*
>


How are you doing the upgrade, using pg_upgrade or pg_dump/pg_restore?

If pg_dump then what version did you use to do the dump 11 or 13.

If you are restoring just a single database did you do pg_dumpall -g to 
fetch the globals(roles, etc) from the 11 instance and then use psql to 
restore those to the 13 instance?

> 
> 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!



-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Whole Database or Table AES encryption
Next
From: "Peter J. Holzer"
Date:
Subject: Re: Replication with Patroni not working after killing secondary and starting again