Thanks for your reply. I am using pg_upgrade to do the upgrade -----Original Message----- From: Adrian Klaver <adrian.klaver@xxxxxxxxxxx> Sent: 27 April 2022 19:00 To: Dives, Chloe <Chloe.Dives@xxxxxxx>; pgsql-general@xxxxxxxxxxxxxxxxxxxx Subject: Re: Privilege error with c functions during postgresql upgrade from 11 -> 13 [EXTERNAL EMAIL] 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@xxxxxxxxxxx This email was sent by and on behalf of GAM Investments. GAM Investments is the corporate brand for GAM Holding AG and its direct and indirect subsidiaries. These companies may be referred to as ‘GAM’ or ‘GAM Investments’. In the United Kingdom, the business of GAM Investments is conducted by GAM (U.K.) Limited (No. 01664573) or one or more entities under the control of GAM (U.K.) Limited, including the following entities authorised and regulated by the Financial Conduct Authority: GAM International Management Limited (No. 01802911), GAM London Limited (No. 00874802), GAM Sterling Management Limited (No. 01750352), GAM Unit Trust Management Company Limited (No. 2873560) and GAM Systematic LLP (No. OC317557). GAM (U.K.) Limited and its regulated entities are registered in England and Wales. The registered office and principal place of business of GAM (U.K.) Limited and its regulated entities is at 8 Finsbury Circus, London, England, EC2M 7GB. The registered office of GAM Systematic LLP is at City House, Hills Road, Cambridge, CB2 1RE. This email, and any attachments, is confidential and may be privileged or otherwise protected from disclosure. It is intended solely for the stated addressee(s) and access to it by any other person is unauthorised. If you are not the intended recipient, you must not disclose, copy, circulate or in any other way use or rely on the information contained herein. If you have received this email in error, please inform us immediately and delete all copies of it. See - https://www.gam.com/en/legal/email-disclosures-eu/ for further information on confidentiality, the risks of non-secure electronic communication, and certain disclosures which we are required to make in accordance with applicable legislation and regulations. If you cannot access this link, please notify us by reply message and we will send the contents to you. GAM Investments will collect and use information about you in the course of your interactions with us. Full details about the data types we collect and what we use this for and your related rights is set out in our online privacy policy at https://www.gam.com/en/legal/privacy-policy. Please familiarise yourself with this policy and check it from time to time for updates as it supplements this notice.