Thread: Error code associated to "could not open relation with OID ..."

Error code associated to "could not open relation with OID ..."

From
"Galantucci Giovanni"
Date:

Hi all,

I’m using jdbc to connect to a remote database and this morning I’ve found an SQLException on my log file with this error description:

“could not open relation with OID ...”.

Does anyone know which error code is associated to such exception?

Thanks in advance

 

Giovanni Galantucci

 

Internet Email Confidentiality Footer

********************************************************************************************************************************************

La presente comunicazione, con le informazioni in essa contenute e ogni documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i destinatari/autorizzati siete avvisati che qualsiasi azione, copia, comunicazione, divulgazione o simili basate sul contenuto di tali informazioni e' vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia di protezione dei dati personali). Se avete ricevuto questa comunicazione per errore, vi preghiamo di darne immediata notizia al mittente e di distruggere il messaggio originale e ogni file allegato senza farne copia alcuna o riprodurne in alcun modo il contenuto.

This e-mail and its attachments are intended for the addressee(s) only and are confidential and/or may contain legally privileged information. If you have received this message by mistake or are not one of the addressees above, you may take no action based on it, and you may not copy or show it to anyone; please reply to this e-mail and point out the error which has occurred.
********************************************************************************************************************************************

Re: Error code associated to "could not open relation with OID ..."

From
Richard Huxton
Date:
Galantucci Giovanni wrote:
> Hi all,
>
> I'm using jdbc to connect to a remote database and this morning I've
> found an SQLException on my log file with this error description:
>
> "could not open relation with OID ...".
>
> Does anyone know which error code is associated to such exception?

It's usually down to a cached plan referring to a temporary table that's
being replaced. Could be a normal table being dropped/recreated though.

It could be a query-plan cached by your jdbc stuff or perhaps a plpgsql
function using TEMP tables?

--
   Richard Huxton
   Archonet Ltd

R: Error code associated to "could not open relation with OID ..."

From
"Galantucci Giovanni"
Date:
I don't use temporary tables in my application.
From a previous post I've understood that this error could happen if I'm trying to access a table whose corresponding
rowin the pg_class table is being modified. So I wanted to catch the error code of such exception to retry a second
insertinto the table. 

Giovanni Galantucci

-----Messaggio originale-----
Da: Richard Huxton [mailto:dev@archonet.com]
Inviato: venerdì 9 marzo 2007 14.51
A: Galantucci Giovanni
Cc: pgsql-general@postgresql.org
Oggetto: Re: [GENERAL] Error code associated to "could not open relation with OID ..."

Galantucci Giovanni wrote:
> Hi all,
>
> I'm using jdbc to connect to a remote database and this morning I've
> found an SQLException on my log file with this error description:
>
> "could not open relation with OID ...".
>
> Does anyone know which error code is associated to such exception?

It's usually down to a cached plan referring to a temporary table that's
being replaced. Could be a normal table being dropped/recreated though.

It could be a query-plan cached by your jdbc stuff or perhaps a plpgsql
function using TEMP tables?

--
   Richard Huxton
   Archonet Ltd


Internet Email Confidentiality Footer
-----------------------------------------------------------------------------------------------------
La presente comunicazione, con le informazioni in essa contenute e ogni documento o file allegato, e' rivolta
unicamentealla/e persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i
destinatari/autorizzatisiete avvisati che qualsiasi azione, copia, comunicazione, divulgazione o simili basate sul
contenutodi tali informazioni e' vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in
materiadi protezione dei dati personali). Se avete ricevuto questa comunicazione per errore, vi preghiamo di darne
immediatanotizia al mittente e di distruggere il messaggio originale e ogni file allegato senza farne copia alcuna o
riprodurnein alcun modo il contenuto.  

This e-mail and its attachments are intended for the addressee(s) only and are confidential and/or may contain legally
privilegedinformation. If you have received this message by mistake or are not one of the addressees above, you may
takeno action based on it, and you may not copy or show it to anyone; please reply to this e-mail and point out the
errorwhich has occurred.  
-----------------------------------------------------------------------------------------------------