Re: Privilege error with c functions during postgresql upgrade from 11 -> 13

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: "Dives, Chloe" <Chloe(dot)Dives(at)gam(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Privilege error with c functions during postgresql upgrade from 11 -> 13
Date: 2022-04-27 18:00:11
Message-ID: 2a9ac618-5d42-5f41-e93d-21667f094b56@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter J. Holzer 2022-04-27 20:05:37 Re: Replication with Patroni not working after killing secondary and starting again
Previous Message Bruce Momjian 2022-04-27 17:01:20 Re: Whole Database or Table AES encryption