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: Wed, 27 Apr 2022 11:00:11 -0700
Message-ID: <2a9ac618-5d42-5f41-e93d-21667f094b56@aklaver.com> (raw)
In-Reply-To: <AM8PR09MB5384B6AF7C3CD36B44E55C3CF0FA9@AM8PR09MB5384.eurprd09.prod.outlook.com>
References: <AM8PR09MB5384B6AF7C3CD36B44E55C3CF0FA9@AM8PR09MB5384.eurprd09.prod.outlook.com>

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





view thread (4+ messages)  latest in thread

Message-ID: <2a9ac618-5d42-5f41-e93d-21667f094b56@aklaver.com>
Permalink:  ../2a9ac618-5d42-5f41-e93d-21667f094b56@aklaver.com/
Also on:    postgresql.org/message-id/2a9ac618-5d42-5f41-e93d-21667f094b56@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: <2a9ac618-5d42-5f41-e93d-21667f094b56@aklaver.com>
  References: <AM8PR09MB5384B6AF7C3CD36B44E55C3CF0FA9@AM8PR09MB5384.eurprd09.prod.outlook.com> <2a9ac618-5d42-5f41-e93d-21667f094b56@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