Thank you all for your comments.
> I would think that the queries in that case would be running as a
superuser in order to do the migrations.
Users of codd can choose the role that applies their migrations. Codd even
supports individual migrations running with ad-hoc users (so that a
migration ca
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
On 8/25/24 17: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 denie
bash script
> > that reproduces it (not always, you might have to run it many times
> > until you see ERROR: could not open relation with OID ):
> >
> > #!/usr/bin/env bash
> > psql -c "create table test(x serial primary key); select oid, relname
> > from
gt; until you see ERROR: could not open relation with OID ):
>
> #!/usr/bin/env bash
> psql -c "create table test(x serial primary key); select oid, relname
> from pg_class where relname='test'"
> # The next two queries will run concurrently
> psql -c
hen querying
>> catalog tables while DDL is happening concurrently. Here's a bash script
>> that reproduces it (not always, you might have to run it many times until
>> you see ERROR: could not open relation with OID ):
>>
> [snip]
>
>> I've seen thi
it many times until
> you see ERROR: could not open relation with OID ):
>
[snip]
> I've seen this happen in Production without pg_sleep in the mix, too. I
> added pg_sleep to the example above only because it makes the error easier
> to reproduce.
>
What version (includ
Hi all,
I can reproduce the error in the subject from time to time when querying
catalog tables while DDL is happening concurrently. Here's a bash script
that reproduces it (not always, you might have to run it many times until
you see ERROR: could not open relation with OID ):
#!/us
Michael Paquier wrote on 1/26/22 9:14 PM:
On Wed, Jan 26, 2022 at 05:30:01PM -0800, Ben Chobot wrote:
Other things we've considered:
- we run pg_repack, which certainly seems like it could make an error
like this, but we see this error in places and times that pg_repack isn't
currently runn
queries
> fail with errors like:
>
> could not open relation with OID 201940279
>
> In the cases we've examined so far, the failed query succeeds just fine when
> we run it manually. The failed query also had run on an async streaming
> replica, and the primary has com
We do a lot of queries per day, over a lot of hosts, all of which are on
12.9. We've recently started doing a better job at analyzing our db logs
and have found that, a few times a day, every day, we see some of our
queries fail with errors like:
could not open relation with OID 20194027
On Thu, Mar 15, 2018 at 12:44 AM, Tom Lane wrote:
>
> The query does fail on < 9.2, because on rows with no reltoastrelid
>
Thats, fine. I will live with that until upgrade.
> But hey, it's a wiki;
> if you feel more ambitious, edit away.
>
I tried but it said:
"The site you are trying to log
On Thu, Mar 15, 2018 at 12:32 AM, Michael Paquier
wrote:
> > I'm running version 9.1.9 so it should be working according to the
> > wiki.
>
> You should update and upgrade. 9.1 has fallen out of community support
>
I will recommend that to the database owner. Thanks
Michael Paquier writes:
> On Wed, Mar 14, 2018 at 04:17:54PM +0100, Hans Schou wrote:
>> I got the message
>> ERROR: could not open relation with OID 0
>> when running the "General Table Size Information" from
>> https://wiki.postgresql.org/wiki/Disk_Usag
On Wed, Mar 14, 2018 at 04:17:54PM +0100, Hans Schou wrote:
> I got the message
> ERROR: could not open relation with OID 0
> when running the "General Table Size Information" from
> https://wiki.postgresql.org/wiki/Disk_Usage
I cannot see this failure on latest HEAD on
Hi
I got the message
ERROR: could not open relation with OID 0
when running the "General Table Size Information" from
https://wiki.postgresql.org/wiki/Disk_Usage
This patch gives some system tables
@@ -12,5 +12,6 @@
FROM pg_class c
LEFT JOIN pg_namespace
p_table106538relpages:1reltuples:1relallvisible:0reltoastrelid:*106541*}psql:/tmp/gg:23:
NOTICE: rel size 32768psql:/tmp/gg:23: ERROR: could not open relation with
OID *106541*
Thank you for the advice about ON COMMIT DROP - it's working.When the table
size is smaller, about 16k this issue simply disappears.
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html
17 matches
Mail list logo