Re: ERROR: could not open relation with OID XXXX

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Marcelo Zabani <mzabani(at)gmail(dot)com>, Tomas Vondra <tomas(at)vondra(dot)me>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: ERROR: could not open relation with OID XXXX
Date: 2024-08-25 16:13:42
Message-ID: 4fb5ab14-80c6-4ca8-b451-df3cbcacd92f@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 8/25/24 08:36, Marcelo Zabani wrote:
> > we do some special stuff for catalogs
>
> That is good to know, thanks!
>
> > I believe you could actually lock the pg_class rows for update. Just
> add FOR UPDATE at the end of the query.
>
> Thanks, but I tried that and got "ERROR:  permission denied for table
> pg_class", even if I try it only for tables the user owns.
>

As I understand it this issue came up in:

https://github.com/mzabani/codd

I would think that the queries in that case would be running as a
superuser in order to do the migrations.

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marcelo Zabani 2024-08-25 17:14:03 Re: ERROR: could not open relation with OID XXXX
Previous Message Tomas Vondra 2024-08-25 15:53:56 Re: ERROR: could not open relation with OID XXXX