Re: "could not open relation with OID" errors after promoting the standby to master - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: "could not open relation with OID" errors after promoting the standby to master
Date
Msg-id 1337225608-sup-3384@alvh.no-ip.org
Whole thread Raw
In response to "could not open relation with OID" errors after promoting the standby to master  (Joachim Wieland <joe@mcknight.de>)
Responses Re: "could not open relation with OID" errors after promoting the standby to master
List pgsql-hackers
Excerpts from Joachim Wieland's message of mar may 15 22:37:15 -0400 2012:
> I've switched servers yesterday night and the previous slave is now
> the master. This is 9.0.6 (originally) / 9.0.7 (now) on Linux.
>
> Now I'm seeing a bunch of
>
> ERROR:  could not open relation with OID 1990987633

> #7  0x00000000004b6e90 in RemoveTempRelations () at namespace.c:3234
> #8  InitTempTableNamespace () at namespace.c:3066

> Any idea? It looks suspicious that it calls into RemoveTempRelations()
> from InitTempNamespace() thereby removing the table it is about to
> create?

Well, that is not surprising in itself -- InitTempTableNamespace calls
RemoveTempRelations to cleanup from a possibly crashed previous backend
with the same ID.  So that part of the backtrace looks normal to me
(unless there is something weird going on, which might very well be the
case).

It looks to me like you might have leftover pg_depend entries without
the corresponding entries in other catalogs (pg_class, etc).  No idea
how that might happen, but maybe it's a starting point to investigate.

--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Joshua Berkus
Date:
Subject: Why is indexonlyscan so darned slow?
Next
From: Robert Haas
Date:
Subject: counting pallocs